diff options
author | emaste <emaste@FreeBSD.org> | 2017-07-16 19:24:09 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2017-07-16 19:24:09 +0000 |
commit | 40ddb165ec0d79e5828695fde93eed4343c8e8fe (patch) | |
tree | be0f8a5c29df780fe23b6764be42a521373ffde9 | |
parent | 2dc7e5882fb8774822fd8747846acbb78ffe2c6f (diff) | |
download | FreeBSD-src-40ddb165ec0d79e5828695fde93eed4343c8e8fe.zip FreeBSD-src-40ddb165ec0d79e5828695fde93eed4343c8e8fe.tar.gz |
MFC r319890: Correct bitwise test in mac_bsdextended ugidfw_rule_valid()
PR: 218039
CID: 1008934
Reported by: Coverity, PVS-Studio
Sponsored by: The FreeBSD Foundation
-rw-r--r-- | sys/security/mac_bsdextended/mac_bsdextended.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index 377fd25..9944d3c 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -125,7 +125,7 @@ ugidfw_rule_valid(struct mac_bsdextended_rule *rule) return (EINVAL); if ((rule->mbr_object.mbo_neg | MBO_ALL_FLAGS) != MBO_ALL_FLAGS) return (EINVAL); - if ((rule->mbr_object.mbo_neg | MBO_TYPE_DEFINED) && + if (((rule->mbr_object.mbo_flags & MBO_TYPE_DEFINED) != 0) && (rule->mbr_object.mbo_type | MBO_ALL_TYPE) != MBO_ALL_TYPE) return (EINVAL); if ((rule->mbr_mode | MBI_ALLPERM) != MBI_ALLPERM) |