summaryrefslogtreecommitdiffstats
path: root/sys/security
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-08-19 06:52:21 +0000
committerphk <phk@FreeBSD.org>2002-08-19 06:52:21 +0000
commit8346c2fde3e084def3fc0de74bf98c5b2f0f0198 (patch)
tree385a22aeef0039426b0158c0ccad32609b9687a7 /sys/security
parent7a01faeb986e02cda904c1b3b06dd18b9a262bb4 (diff)
downloadFreeBSD-src-8346c2fde3e084def3fc0de74bf98c5b2f0f0198.zip
FreeBSD-src-8346c2fde3e084def3fc0de74bf98c5b2f0f0198.tar.gz
Keep a copy of the credential used to mount filesystems around so
we can check and use it later on. Change the pieces of code which relied on mount->mnt_stat.f_owner to check which user mounted the filesystem. This became needed as the EA code needs to be able to allocate blocks for "system" EA users like ACLs. There seems to be some half-baked (probably only quarter- actually) notion that the superuser for a given filesystem is the user who mounted it, but this has far from been carried through. It is unclear if it should be. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/lomac/kernel_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/security/lomac/kernel_util.c b/sys/security/lomac/kernel_util.c
index 91e488e..42de899 100644
--- a/sys/security/lomac/kernel_util.c
+++ b/sys/security/lomac/kernel_util.c
@@ -383,7 +383,7 @@ unmount(td, uap)
*/
if (!mediate_subject_at_level("unmount", td->td_proc,
LOMAC_HIGHEST_LEVEL) ||
- ((mp->mnt_stat.f_owner != td->td_ucred->cr_uid) &&
+ ((mp->mnt_cred->cr_uid != td->td_ucred->cr_uid) &&
(error = suser(td)))) {
vput(vp);
return (error);
OpenPOWER on IntegriCloud