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.
This commit is contained in:
Robert Watson 2008-05-06 00:32:23 +00:00
parent 8ab7ce7c61
commit 7d8ab8bafb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178802

View File

@ -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)