summaryrefslogtreecommitdiffstats
path: root/sys/security/mac_bsdextended
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2008-09-10 13:16:41 +0000
committertrasz <trasz@FreeBSD.org>2008-09-10 13:16:41 +0000
commit9303940ffeb9f2f1fa70ff3cd8ea2c8fbabda10b (patch)
treeed7bf9cb2d91f45bd6197c9711c035069d33b3df /sys/security/mac_bsdextended
parent11fabd36c2894e56ba1ac22dce018446ffe1e7c5 (diff)
downloadFreeBSD-src-9303940ffeb9f2f1fa70ff3cd8ea2c8fbabda10b.zip
FreeBSD-src-9303940ffeb9f2f1fa70ff3cd8ea2c8fbabda10b.tar.gz
Remove VSVTX, VSGID and VSUID. This should be a no-op,
as VSVTX == S_ISVTX, VSGID == S_ISGID and VSUID == S_ISUID. Approved by: rwatson (mentor)
Diffstat (limited to 'sys/security/mac_bsdextended')
-rw-r--r--sys/security/mac_bsdextended/mac_bsdextended.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c
index b55056c..cb993db 100644
--- a/sys/security/mac_bsdextended/mac_bsdextended.c
+++ b/sys/security/mac_bsdextended/mac_bsdextended.c
@@ -61,6 +61,7 @@
#include <sys/vnode.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
+#include <sys/stat.h>
#include <security/mac/mac_policy.h>
#include <security/mac_bsdextended/mac_bsdextended.h>
@@ -303,7 +304,7 @@ ugidfw_rulecheck(struct mac_bsdextended_rule *rule,
}
if (rule->mbr_object.mbo_flags & MBO_SUID) {
- match = (vap->va_mode & VSUID);
+ match = (vap->va_mode & S_ISUID);
if (rule->mbr_object.mbo_neg & MBO_SUID)
match = !match;
if (!match)
@@ -311,7 +312,7 @@ ugidfw_rulecheck(struct mac_bsdextended_rule *rule,
}
if (rule->mbr_object.mbo_flags & MBO_SGID) {
- match = (vap->va_mode & VSGID);
+ match = (vap->va_mode & S_ISGID);
if (rule->mbr_object.mbo_neg & MBO_SGID)
match = !match;
if (!match)
OpenPOWER on IntegriCloud