diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-06-07 22:27:15 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-06-07 22:27:15 +0000 |
commit | 9f332c91ef20b2392e96c3aed469ba04aeb7b13f (patch) | |
tree | 23e84b7f5fd5465f12ed2c509373ee128d73a43a /sys/kern/init_main.c | |
parent | 1f72bba08402b15a14e6c65f84d0d252f2d2bc1c (diff) | |
download | FreeBSD-src-9f332c91ef20b2392e96c3aed469ba04aeb7b13f.zip FreeBSD-src-9f332c91ef20b2392e96c3aed469ba04aeb7b13f.tar.gz |
Move per-process audit state from a pointer in the proc structure to
embedded storage in struct ucred. This allows audit state to be cached
with the thread, avoiding locking operations with each system call, and
makes it available in asynchronous execution contexts, such as deep in
the network stack or VFS.
Reviewed by: csjp
Approved by: re (kensmith)
Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 0be3af3..10996e7 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -441,8 +441,7 @@ proc0_init(void *dummy __unused) p->p_ucred->cr_ruidinfo = uifind(0); p->p_ucred->cr_prison = NULL; /* Don't jail it. */ #ifdef AUDIT - audit_proc_alloc(p); - audit_proc_kproc0(p); + audit_cred_kproc0(p->p_ucred); #endif #ifdef MAC mac_create_proc0(p->p_ucred); @@ -707,7 +706,7 @@ create_init(const void *udata __unused) mac_create_proc1(newcred); #endif #ifdef AUDIT - audit_proc_init(initproc); + audit_cred_proc1(newcred); #endif initproc->p_ucred = newcred; PROC_UNLOCK(initproc); |