summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-09-16 17:03:02 +0000
committerrwatson <rwatson@FreeBSD.org>2006-09-16 17:03:02 +0000
commit76eda1318af3b4561195bf281b8cd174a7038416 (patch)
tree11299abe5365a5fe73d10676c26005ce40d4adcd /sys
parent97a1b8f884131b9db05eda41b2867738bf83216c (diff)
downloadFreeBSD-src-76eda1318af3b4561195bf281b8cd174a7038416.zip
FreeBSD-src-76eda1318af3b4561195bf281b8cd174a7038416.tar.gz
Add audit hooks for ppc, ia64 system call paths.
Reviewed by: marcel (ia64) Obtained from: TrustedBSD Project MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/ia64/ia32/ia32_trap.c4
-rw-r--r--sys/ia64/ia64/trap.c4
-rw-r--r--sys/powerpc/aim/trap.c4
-rw-r--r--sys/powerpc/powerpc/trap.c4
4 files changed, 16 insertions, 0 deletions
diff --git a/sys/ia64/ia32/ia32_trap.c b/sys/ia64/ia32/ia32_trap.c
index af3f225..b900d66 100644
--- a/sys/ia64/ia32/ia32_trap.c
+++ b/sys/ia64/ia32/ia32_trap.c
@@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$");
#include <machine/md_var.h>
#include <i386/include/psl.h>
+#include <security/audit/audit.h>
+
extern char *syscallnames[];
static void
@@ -122,7 +124,9 @@ ia32_syscall(struct trapframe *tf)
PTRACESTOP_SC(p, td, S_PT_SCE);
+ AUDIT_SYSCALL_ENTER(code, td);
error = (*callp->sy_call)(td, args64);
+ AUDIT_SYSCALL_EXIT(error, td);
}
switch (error) {
diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c
index c1a1cfa..41365a9 100644
--- a/sys/ia64/ia64/trap.c
+++ b/sys/ia64/ia64/trap.c
@@ -72,6 +72,8 @@ __FBSDID("$FreeBSD$");
#include <sys/ktrace.h>
#endif
+#include <security/audit/audit.h>
+
#include <ia64/disasm/disasm.h>
static int print_usertrap = 0;
@@ -1016,7 +1018,9 @@ syscall(struct trapframe *tf)
PTRACESTOP_SC(p, td, S_PT_SCE);
+ AUDIT_SYSCALL_ENTER(code, td);
error = (*callp->sy_call)(td, args);
+ AUDIT_SYSCALL_EXIT(error, td);
if (error != EJUSTRETURN) {
/*
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c
index 33ad897..08bd248 100644
--- a/sys/powerpc/aim/trap.c
+++ b/sys/powerpc/aim/trap.c
@@ -55,6 +55,8 @@ __FBSDID("$FreeBSD$");
#endif
#include <sys/vmmeter.h>
+#include <security/audit/audit.h>
+
#include <vm/vm.h>
#include <vm/pmap.h>
#include <vm/vm_extern.h>
@@ -418,7 +420,9 @@ syscall(struct trapframe *frame)
PTRACESTOP_SC(p, td, S_PT_SCE);
+ AUDIT_SYSCALL_ENTER(code, td);
error = (*callp->sy_call)(td, params);
+ AUDIT_SYSCALL_EXIT(error, td);
CTR3(KTR_SYSC, "syscall: p=%s %s ret=%x", p->p_comm,
syscallnames[code], td->td_retval[0]);
diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c
index 33ad897..08bd248 100644
--- a/sys/powerpc/powerpc/trap.c
+++ b/sys/powerpc/powerpc/trap.c
@@ -55,6 +55,8 @@ __FBSDID("$FreeBSD$");
#endif
#include <sys/vmmeter.h>
+#include <security/audit/audit.h>
+
#include <vm/vm.h>
#include <vm/pmap.h>
#include <vm/vm_extern.h>
@@ -418,7 +420,9 @@ syscall(struct trapframe *frame)
PTRACESTOP_SC(p, td, S_PT_SCE);
+ AUDIT_SYSCALL_ENTER(code, td);
error = (*callp->sy_call)(td, params);
+ AUDIT_SYSCALL_EXIT(error, td);
CTR3(KTR_SYSC, "syscall: p=%s %s ret=%x", p->p_comm,
syscallnames[code], td->td_retval[0]);
OpenPOWER on IntegriCloud