summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-02-05 21:08:25 +0000
committerrwatson <rwatson@FreeBSD.org>2006-02-05 21:08:25 +0000
commit4cd971d35d0224553926d1a325da1e80421fafc1 (patch)
tree610aa106190d1c10d8b8048ff1bbbcd80c2dedd9 /sys/kern/kern_exit.c
parent8b356bb2d71d51c2f4e3e21940c236964e1c5b3c (diff)
downloadFreeBSD-src-4cd971d35d0224553926d1a325da1e80421fafc1.zip
FreeBSD-src-4cd971d35d0224553926d1a325da1e80421fafc1.tar.gz
On process exit, audit the return value of the process, and commit the
record immediately, as this system call never returns. Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 05bd39c..3ff3409 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -183,6 +183,17 @@ retry:
PROC_UNLOCK(p);
+#ifdef AUDIT
+ /*
+ * The Sun BSM exit token contains two components: an exit status as
+ * passed to exit(), and a return value to indicate what sort of exit
+ * it was. The exit status is WEXITSTATUS(rv), but it's not clear
+ * what the return value is.
+ */
+ AUDIT_ARG(exit, WEXITSTATUS(rv), 0);
+ AUDIT_SYSCALL_EXIT(0, td);
+#endif
+
/* Are we a task leader? */
if (p == p->p_leader) {
mtx_lock(&ppeers_lock);
OpenPOWER on IntegriCloud