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:
parent
bbb0e3d9d5
commit
cd6bbe656e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186822
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user