summaryrefslogtreecommitdiffstats
path: root/sys/security
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-01-03 12:08:18 +0000
committerrwatson <rwatson@FreeBSD.org>2005-01-03 12:08:18 +0000
commitf35086bd6a29893ca913f996266cc1c1f39f88e0 (patch)
treea1de6e6335344fb81d3c11b2a898908d591b74d9 /sys/security
parent742d1c9a2deef3e3a8c55e763a1e8c2e46b2becb (diff)
downloadFreeBSD-src-f35086bd6a29893ca913f996266cc1c1f39f88e0.zip
FreeBSD-src-f35086bd6a29893ca913f996266cc1c1f39f88e0.tar.gz
Exempt the superuser from mac_seeotheruids checks.
Submitted by: bkoenig at cs dot tu-berlin dot de PR: 72238 MFC after: 2 weeks
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/mac_seeotheruids/mac_seeotheruids.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/security/mac_seeotheruids/mac_seeotheruids.c b/sys/security/mac_seeotheruids/mac_seeotheruids.c
index 9da454c..d2e856f 100644
--- a/sys/security/mac_seeotheruids/mac_seeotheruids.c
+++ b/sys/security/mac_seeotheruids/mac_seeotheruids.c
@@ -117,6 +117,9 @@ mac_seeotheruids_check(struct ucred *u1, struct ucred *u2)
if (u1->cr_ruid == u2->cr_ruid)
return (0);
+ if (suser_cred(u1, 0) == 0)
+ return (0);
+
return (ESRCH);
}
OpenPOWER on IntegriCloud