diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-02-05 21:06:09 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-02-05 21:06:09 +0000 |
commit | 8b356bb2d71d51c2f4e3e21940c236964e1c5b3c (patch) | |
tree | c2832482b05618bdf96d3398a4a35093c20bdf7a /sys/security/audit/audit.c | |
parent | 29de4be4fa86c57ac7b74ed74857528a3f8991b7 (diff) | |
download | FreeBSD-src-8b356bb2d71d51c2f4e3e21940c236964e1c5b3c.zip FreeBSD-src-8b356bb2d71d51c2f4e3e21940c236964e1c5b3c.tar.gz |
When GC'ing a thread, assert that it has no active audit record.
This should not happen, but with this assert, brueffer and I would
not have spent 45 minutes trying to figure out why he wasn't
seeing audit records with the audit version in CVS.
Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/security/audit/audit.c')
-rw-r--r-- | sys/security/audit/audit.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/security/audit/audit.c b/sys/security/audit/audit.c index 1d3c3e6..5d431b1 100644 --- a/sys/security/audit/audit.c +++ b/sys/security/audit/audit.c @@ -1025,6 +1025,16 @@ audit_thread_alloc(struct thread *td) td->td_ar = NULL; } +/* + * Thread destruction. + */ +void +audit_thread_free(struct thread *td) +{ + + KASSERT(td->td_ar == NULL, ("audit_thread_free: td_ar != NULL")); +} + /* * Initialize the audit information for the a process, presumably the first * process in the system. |