diff options
author | mjg <mjg@FreeBSD.org> | 2015-03-16 00:10:03 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2015-03-16 00:10:03 +0000 |
commit | 054f9cab595b222f85a975c8e12658ce0856c346 (patch) | |
tree | d2955bf63801be88abf97941c4408cfec687393c /sys/kern/kern_loginclass.c | |
parent | 0038f0beedb51509dd45ce20e69215e0e61f9c71 (diff) | |
download | FreeBSD-src-054f9cab595b222f85a975c8e12658ce0856c346.zip FreeBSD-src-054f9cab595b222f85a975c8e12658ce0856c346.tar.gz |
cred: add proc_set_cred helper
The goal here is to provide one place altering process credentials.
This eases debugging and opens up posibilities to do additional work when such
an action is performed.
Diffstat (limited to 'sys/kern/kern_loginclass.c')
-rw-r--r-- | sys/kern/kern_loginclass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_loginclass.c b/sys/kern/kern_loginclass.c index c0946ef..62e6421 100644 --- a/sys/kern/kern_loginclass.c +++ b/sys/kern/kern_loginclass.c @@ -221,7 +221,7 @@ sys_setloginclass(struct thread *td, struct setloginclass_args *uap) PROC_LOCK(p); oldcred = crcopysafe(p, newcred); newcred->cr_loginclass = newlc; - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); |