Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2018 17:14:12 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341822 - head/sys/security/audit
Message-ID:  <201812111714.wBBHECSk095831@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812111714.wBBHECSk095831>