PERFORCE change 91071 for review

Wayne Salamon wsalamon at FreeBSD.org
Sat Feb 4 15:56:38 GMT 2006


http://perforce.freebsd.org/chv.cgi?CH=91071

Change 91071 by wsalamon at gretsch on 2006/02/04 15:56:37

	Call the audit hooks for the amd64 architectures.

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/amd64/amd64/trap.c#7 edit
.. //depot/projects/trustedbsd/audit3/sys/amd64/ia32/ia32_syscall.c#5 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/sys/amd64/amd64/trap.c#7 (text+ko) ====

@@ -75,6 +75,7 @@
 #ifdef HWPMC_HOOKS
 #include <sys/pmckern.h>
 #endif
+#include <security/audit/audit.h>
 
 #include <vm/vm.h>
 #include <vm/vm_param.h>
@@ -823,10 +824,15 @@
 
 		if ((callp->sy_narg & SYF_MPSAFE) == 0) {
 			mtx_lock(&Giant);
+			AUDIT_SYSCALL_ENTER(code, td);
 			error = (*callp->sy_call)(td, argp);
+			AUDIT_SYSCALL_EXIT(error, td);
 			mtx_unlock(&Giant);
-		} else
+		} else {
+			AUDIT_SYSCALL_ENTER(code, td);
 			error = (*callp->sy_call)(td, argp);
+			AUDIT_SYSCALL_EXIT(error, td);
+		}
 	}
 
 	switch (error) {

==== //depot/projects/trustedbsd/audit3/sys/amd64/ia32/ia32_syscall.c#5 (text+ko) ====

@@ -66,6 +66,7 @@
 #ifdef KTRACE
 #include <sys/ktrace.h>
 #endif
+#include <security/audit/audit.h>
 
 #include <vm/vm.h>
 #include <vm/vm_param.h>
@@ -184,7 +185,9 @@
 
 		STOPEVENT(p, S_SCE, narg);
 
+		AUDIT_SYSCALL_ENTER(code, td);
 		error = (*callp->sy_call)(td, args64);
+		AUDIT_SYSCALL_EXIT(error, td);
 	}
 
 	switch (error) {
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list