1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

In AUDIT_SYSCALL_EXIT(), invoke audit_syscall_exit() only if an audit

record is active on the current thread--historically we may always
have wanted to enter the audit code if auditing was enabled, but now
we just commit the audit record so don't need to enter if there isn't
one.

Obtained from:	TrustedBSD Project
Sponsored by:	Apple, Inc.
This commit is contained in:
Robert Watson 2009-01-06 13:59:59 +00:00
parent bbb0e3d9d5
commit cd6bbe656e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186822

View File

@ -198,11 +198,11 @@ void audit_thread_free(struct thread *td);
/*
* Wrap the audit_syscall_exit() function so that it is called only when
* auditing is enabled, or we have a audit record on the thread. It is
* possible that an audit record was begun before auditing was turned off.
* we have a audit record on the thread. Audit records can persist after
* auditing is disabled, so we don't just check audit_enabled here.
*/
#define AUDIT_SYSCALL_EXIT(error, td) do { \
if (audit_enabled || (td->td_ar != NULL)) \
if (td->td_ar != NULL) \
audit_syscall_exit(error, td); \
} while (0)