diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-05-06 00:32:23 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-05-06 00:32:23 +0000 |
commit | 3b1946ec178b6df4cde4eb680143fceb53ee5ca0 (patch) | |
tree | 0d9ad3f0e690a53649c13dffb6a80fadd745f28a /sys/security | |
parent | 4610acbd56d37144ea538a41729ab7b93fd541d1 (diff) | |
download | FreeBSD-src-3b1946ec178b6df4cde4eb680143fceb53ee5ca0.zip FreeBSD-src-3b1946ec178b6df4cde4eb680143fceb53ee5ca0.tar.gz |
When testing whether to enter the audit argument gathering code, rather
than checking whether audit is enabled globally, instead check whether
the current thread has an audit record. This avoids entering the audit
code to collect argument data if auditing is enabled but the current
system call is not of interest to audit.
MFC after: 1 week
Sponsored by: Apple, Inc.
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/audit/audit.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/security/audit/audit.h b/sys/security/audit/audit.h index 5b2f686..f44800a 100644 --- a/sys/security/audit/audit.h +++ b/sys/security/audit/audit.h @@ -186,7 +186,7 @@ void audit_thread_free(struct thread *td); * audit_enabled flag before performing the actual call. */ #define AUDIT_ARG(op, args...) do { \ - if (audit_enabled) \ + if (td->td_ar != NULL) \ audit_arg_ ## op (args); \ } while (0) |