From 89964dd28499d2be35566227c2e46cfccdf74fe9 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Mon, 6 Feb 2006 01:51:08 +0000 Subject: [PATCH] When exiting a thread, submit any pending record. Today, we don't audit thread exit, but should that happen, this will prevent unhappiness, as the thread exit system call will never return, and hence not commit the record. Pointed out by/with: cognet Obtained from: TrustedBSD Project --- sys/kern/kern_thread.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index d36ae2e5e06..c3c06d9bf15 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -471,6 +471,10 @@ thread_exit(void) (long)p->p_pid, p->p_comm); KASSERT(TAILQ_EMPTY(&td->td_sigqueue.sq_list), ("signal pending")); +#ifdef AUDIT + AUDIT_SYSCALL_EXIT(0, td); +#endif + if (td->td_standin != NULL) { /* * Note that we don't need to free the cred here as it