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)
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to