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/security/mac | |
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/security/mac')
-rw-r--r-- | sys/security/mac/mac_syscalls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index f084ea4..304d313 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -208,7 +208,7 @@ sys___mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap) setsugid(p); crcopy(newcred, oldcred); mac_cred_relabel(newcred, intlabel); - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); crfree(oldcred); |