summaryrefslogtreecommitdiffstats
path: root/sys/security
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2015-03-15 21:43:43 +0000
committermjg <mjg@FreeBSD.org>2015-03-15 21:43:43 +0000
commitcad4d97aa8cf8bb6c9c1c851afb3c7c5e3dcc42e (patch)
tree6e4a8715181f697ac02b2430f831f49ec029bcdd /sys/security
parent88f71e0aa9a0ae7e8519772564f973462ebb7355 (diff)
downloadFreeBSD-src-cad4d97aa8cf8bb6c9c1c851afb3c7c5e3dcc42e.zip
FreeBSD-src-cad4d97aa8cf8bb6c9c1c851afb3c7c5e3dcc42e.tar.gz
audit: fix cred assignment when A_SETPMASK is used
The code used to modify curproc instead of the target process. Discussed with: rwatson MFC after: 3 days
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/audit/audit_syscalls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/security/audit/audit_syscalls.c b/sys/security/audit/audit_syscalls.c
index acf005e..6ef606b 100644
--- a/sys/security/audit/audit_syscalls.c
+++ b/sys/security/audit/audit_syscalls.c
@@ -461,7 +461,7 @@ sys_auditon(struct thread *td, struct auditon_args *uap)
udata.au_aupinfo.ap_mask.am_success;
newcred->cr_audit.ai_mask.am_failure =
udata.au_aupinfo.ap_mask.am_failure;
- td->td_proc->p_ucred = newcred;
+ tp->p_ucred = newcred;
PROC_UNLOCK(tp);
crfree(oldcred);
break;
OpenPOWER on IntegriCloud