diff options
| author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2008-09-10 13:16:41 +0000 |
|---|---|---|
| committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2008-09-10 13:16:41 +0000 |
| commit | dfa7fd1d706480334ef39301e55b57481d959e72 (patch) | |
| tree | ed7bf9cb2d91f45bd6197c9711c035069d33b3df /sys/security/mac_bsdextended | |
| parent | 9d53bbefbade7b04b3c3ac0a95499b700bdcfef7 (diff) | |
Notes
Diffstat (limited to 'sys/security/mac_bsdextended')
| -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 b55056c897a5..cb993dbfba26 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) |
