svn commit: r319890 - head/sys/security/mac_bsdextended
Ed Maste
emaste at FreeBSD.org
Tue Jun 13 01:18:00 UTC 2017
Author: emaste
Date: Tue Jun 13 01:17:58 2017
New Revision: 319890
URL: https://svnweb.freebsd.org/changeset/base/319890
Log:
Correct bitwise test in mac_bsdextended ugidfw_rule_valid()
PR: 218039
CID: 1008934
Reported by: Coverity, PVS-Studio
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10300
Modified:
head/sys/security/mac_bsdextended/mac_bsdextended.c
Modified: head/sys/security/mac_bsdextended/mac_bsdextended.c
==============================================================================
--- head/sys/security/mac_bsdextended/mac_bsdextended.c Tue Jun 13 01:13:09 2017 (r319889)
+++ head/sys/security/mac_bsdextended/mac_bsdextended.c Tue Jun 13 01:17:58 2017 (r319890)
@@ -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)
More information about the svn-src-all
mailing list