svn commit: r341822 - head/sys/security/audit

Mateusz Guzik mjg at FreeBSD.org
Tue Dec 11 17:14:13 UTC 2018


Author: mjg
Date: Tue Dec 11 17:14:12 2018
New Revision: 341822
URL: https://svnweb.freebsd.org/changeset/base/341822

Log:
  audi: replace open-coded TDP_AUDITREC checks with the macro
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/security/audit/audit.h

Modified: head/sys/security/audit/audit.h
==============================================================================
--- head/sys/security/audit/audit.h	Tue Dec 11 16:49:01 2018	(r341821)
+++ head/sys/security/audit/audit.h	Tue Dec 11 17:14:12 2018	(r341822)
@@ -389,7 +389,7 @@ void	 audit_thread_free(struct thread *td);
  * auditing is disabled, so we don't just check audit_syscalls_enabled here.
  */
 #define	AUDIT_SYSCALL_EXIT(error, td)	do {				\
-	if (td->td_pflags & TDP_AUDITREC)				\
+	if (AUDITING_TD(td))						\
 		audit_syscall_exit(error, td);				\
 } while (0)
 
@@ -397,7 +397,7 @@ void	 audit_thread_free(struct thread *td);
  * A Macro to wrap the audit_sysclose() function.
  */
 #define	AUDIT_SYSCLOSE(td, fd)	do {					\
-	if (td->td_pflags & TDP_AUDITREC)				\
+	if (AUDITING_TD(td))						\
 		audit_sysclose(td, fd);					\
 } while (0)
 


More information about the svn-src-all mailing list