svn commit: r321055 - stable/11/sys/security/mac_bsdextended
Ed Maste
emaste at FreeBSD.org
Sun Jul 16 19:24:11 UTC 2017
Author: emaste
Date: Sun Jul 16 19:24:09 2017
New Revision: 321055
URL: https://svnweb.freebsd.org/changeset/base/321055
Log:
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
Modified:
stable/11/sys/security/mac_bsdextended/mac_bsdextended.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/security/mac_bsdextended/mac_bsdextended.c
==============================================================================
--- stable/11/sys/security/mac_bsdextended/mac_bsdextended.c Sun Jul 16 19:21:33 2017 (r321054)
+++ stable/11/sys/security/mac_bsdextended/mac_bsdextended.c Sun Jul 16 19:24:09 2017 (r321055)
@@ -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