1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

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
This commit is contained in:
Mateusz Guzik 2015-03-15 21:43:43 +00:00
parent e2ad437112
commit eb0b6ba016
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=280121

View File

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