From owner-svn-src-stable@freebsd.org Sun Jul 16 19:25:19 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 668B9C78383; Sun, 16 Jul 2017 19:25:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3040964037; Sun, 16 Jul 2017 19:25:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6GJPIi4017596; Sun, 16 Jul 2017 19:25:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6GJPIpS017595; Sun, 16 Jul 2017 19:25:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707161925.v6GJPIpS017595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 16 Jul 2017 19:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321056 - stable/10/sys/security/mac_bsdextended X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/security/mac_bsdextended X-SVN-Commit-Revision: 321056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 19:25:19 -0000 Author: emaste Date: Sun Jul 16 19:25:18 2017 New Revision: 321056 URL: https://svnweb.freebsd.org/changeset/base/321056 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/10/sys/security/mac_bsdextended/mac_bsdextended.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/security/mac_bsdextended/mac_bsdextended.c ============================================================================== --- stable/10/sys/security/mac_bsdextended/mac_bsdextended.c Sun Jul 16 19:24:09 2017 (r321055) +++ stable/10/sys/security/mac_bsdextended/mac_bsdextended.c Sun Jul 16 19:25:18 2017 (r321056) @@ -126,7 +126,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)