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

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;