Add audit hooks for ppc, ia64 system call paths.

Reviewed by:	marcel (ia64)
Obtained from:	TrustedBSD Project
MFC after:	3 days
This commit is contained in:
rwatson 2006-09-16 17:03:02 +00:00
parent 97a1b8f884
commit 76eda1318a
4 changed files with 16 additions and 0 deletions

View File

@ -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) {

View File

@ -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) {
/*

View File

@ -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]);

View File

@ -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]);