summaryrefslogtreecommitdiffstats
path: root/sys/security/audit/audit_arg.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-06-07 22:27:15 +0000
committerrwatson <rwatson@FreeBSD.org>2007-06-07 22:27:15 +0000
commit9f332c91ef20b2392e96c3aed469ba04aeb7b13f (patch)
tree23e84b7f5fd5465f12ed2c509373ee128d73a43a /sys/security/audit/audit_arg.c
parent1f72bba08402b15a14e6c65f84d0d252f2d2bc1c (diff)
downloadFreeBSD-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/security/audit/audit_arg.c')
-rw-r--r--sys/security/audit/audit_arg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c
index b5e565a..914f918 100644
--- a/sys/security/audit/audit_arg.c
+++ b/sys/security/audit/audit_arg.c
@@ -364,13 +364,13 @@ audit_arg_process(struct proc *p)
if (ar == NULL)
return;
- ar->k_ar.ar_arg_auid = p->p_au->ai_auid;
+ ar->k_ar.ar_arg_auid = p->p_ucred->cr_audit.ai_auid;
ar->k_ar.ar_arg_euid = p->p_ucred->cr_uid;
ar->k_ar.ar_arg_egid = p->p_ucred->cr_groups[0];
ar->k_ar.ar_arg_ruid = p->p_ucred->cr_ruid;
ar->k_ar.ar_arg_rgid = p->p_ucred->cr_rgid;
- ar->k_ar.ar_arg_asid = p->p_au->ai_asid;
- ar->k_ar.ar_arg_termid_addr = p->p_au->ai_termid;
+ ar->k_ar.ar_arg_asid = p->p_ucred->cr_audit.ai_asid;
+ ar->k_ar.ar_arg_termid_addr = p->p_ucred->cr_audit.ai_termid;
ar->k_ar.ar_arg_pid = p->p_pid;
ARG_SET_VALID(ar, ARG_AUID | ARG_EUID | ARG_EGID | ARG_RUID |
ARG_RGID | ARG_ASID | ARG_TERMID_ADDR | ARG_PID | ARG_PROCESS);
OpenPOWER on IntegriCloud