diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-10-28 12:49:07 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-10-28 12:49:07 +0000 |
commit | bc6713490924420312442a3f3fc4ef1fe4b8e400 (patch) | |
tree | 11292438318e6e58424564a501423b69ab5ca6bb /sys/security/mac/mac_syscalls.c | |
parent | b9b0d2c54ca54660de39e9aa6f9bfd4c9653adb3 (diff) | |
download | FreeBSD-src-bc6713490924420312442a3f3fc4ef1fe4b8e400.zip FreeBSD-src-bc6713490924420312442a3f3fc4ef1fe4b8e400.tar.gz |
Rename mac_cred_mmapped_drop_perms(), which revokes access to virtual
memory mappings when the MAC label on a process changes, to
mac_proc_vm_revoke(),
It now also acquires its own credential reference directly from the
affected process rather than accepting one passed by the the caller,
simplifying the API and consumer code.
Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/security/mac/mac_syscalls.c')
-rw-r--r-- | sys/security/mac/mac_syscalls.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index 5cff185..c4b0606 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -203,17 +203,9 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap) mac_cred_relabel(newcred, intlabel); p->p_ucred = newcred; - /* - * Grab additional reference for use while revoking mmaps, prior to - * releasing the proc lock and sharing the cred. - */ - crhold(newcred); PROC_UNLOCK(p); - - mac_cred_mmapped_drop_perms(td, newcred); - - crfree(newcred); /* Free revocation reference. */ crfree(oldcred); + mac_proc_vm_revoke(td); out: mac_cred_label_free(intlabel); |