diff options
author | trasz <trasz@FreeBSD.org> | 2008-09-10 13:16:41 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2008-09-10 13:16:41 +0000 |
commit | 9303940ffeb9f2f1fa70ff3cd8ea2c8fbabda10b (patch) | |
tree | ed7bf9cb2d91f45bd6197c9711c035069d33b3df /sys/security/mac_bsdextended/mac_bsdextended.c | |
parent | 11fabd36c2894e56ba1ac22dce018446ffe1e7c5 (diff) | |
download | FreeBSD-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/mac_bsdextended.c')
-rw-r--r-- | sys/security/mac_bsdextended/mac_bsdextended.c | 5 |
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) |