summaryrefslogtreecommitdiffstats
path: root/sys/security/mac/mac_syscalls.c
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2015-03-16 00:10:03 +0000
committermjg <mjg@FreeBSD.org>2015-03-16 00:10:03 +0000
commit054f9cab595b222f85a975c8e12658ce0856c346 (patch)
treed2955bf63801be88abf97941c4408cfec687393c /sys/security/mac/mac_syscalls.c
parent0038f0beedb51509dd45ce20e69215e0e61f9c71 (diff)
downloadFreeBSD-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/mac_syscalls.c')
-rw-r--r--sys/security/mac/mac_syscalls.c2
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);
OpenPOWER on IntegriCloud