From patchwork Mon Jul 25 16:37:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miroslav Vadkerti X-Patchwork-Id: 9246051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 25C9460757 for ; Mon, 25 Jul 2016 16:48:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16A6D26490 for ; Mon, 25 Jul 2016 16:48:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B31626CF9; Mon, 25 Jul 2016 16:48:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from emsm-gh1-uea11.nsa.gov (smtp.nsa.gov [8.44.101.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C768326C2F for ; Mon, 25 Jul 2016 16:48:21 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.28,420,1464652800"; d="scan'208";a="17913121" IronPort-PHdr: =?us-ascii?q?9a23=3A0eLQ9RcxQrGA9vogrYXfVfQIlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc6/YR7h7PlgxGXEQZ/co6odzbGH6+a+ACdZuc7JmUtBWaQEbwUCh8?= =?us-ascii?q?QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4?= =?us-ascii?q?Ov7yUtaLyZ/mj6bsotaKO10ArQH+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf?= =?us-ascii?q?9d32JiKAHbtR/94sCt4MwrqHwI6Loc7coIbYHWN+R9FOQZX3waNDUu6cnqswTT?= =?us-ascii?q?ZRee7XsbFGMNm1xHBBaWwgv9W8LUszH9re50xmGkNMH1QKooWHz26rliRBzlkj?= =?us-ascii?q?svLTM18GjLzMd3ifQI81qauxVjztuMM8muP/1kc/aYJIsX?= X-IPAS-Result: =?us-ascii?q?A2E/BQBvQZZX/wHyM5BdHAEBgyGBUrpYJYdFTAEBAQEBAQI?= =?us-ascii?q?CWieCMgQDEIIUAgQBAjcUIAsDAwkBARcpCAgDASkEFREOCwUYBIgPtUgBCgEBA?= =?us-ascii?q?QEihiqGF4JIEQFohQ8FmSiObwKJaYVUkCFUg3Vsh1iBNQEBAQ?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.nsa.gov with ESMTP; 25 Jul 2016 16:45:29 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u6PGc8OF026459; Mon, 25 Jul 2016 12:39:39 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id u6PGc61v058251 for ; Mon, 25 Jul 2016 12:38:06 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u6PGc4Cr026453 for ; Mon, 25 Jul 2016 12:38:05 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1DVAQD8P5ZXhxy3hNFdHAEBhHOlT5EKhAuGHQKBP0wBAQEBAQETAQEBCgsJCRmFDAIBA3kQUS0qGYgwtUcBAQgnhiqGF4NChQ8FmSiObwKPPZAhgnCBWToyiQ0BAQE X-IPAS-Result: A1DVAQD8P5ZXhxy3hNFdHAEBhHOlT5EKhAuGHQKBP0wBAQEBAQETAQEBCgsJCRmFDAIBA3kQUS0qGYgwtUcBAQgnhiqGF4NChQ8FmSiObwKPPZAhgnCBWToyiQ0BAQE X-IronPort-AV: E=Sophos;i="5.28,420,1464667200"; d="scan'208";a="5600776" Received: from emsm-gh1-uea10.corp.nsa.gov (HELO emsm-gh1-uea10.nsa.gov) ([10.208.41.36]) by goalie.tycho.ncsc.mil with ESMTP; 25 Jul 2016 12:37:41 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3AmGF3JBRu742pWbNaVp0ST0uDtdpsv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa64YBSN2/xhgRfzUJnB7Loc0qyN4vimBzVLuM7Z+Fk5M7V0Hycfjs?= =?us-ascii?q?sXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJP?= =?us-ascii?q?K/jvHcaK1oLshrj0pcSYOl0QzBOGIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu?= =?us-ascii?q?5NznlpL1/A1zz158O34YIxu38I46FppIZ8VvDhcqA5S6FIJCg3OGAyosvwvF/M?= =?us-ascii?q?ShXcyGEbVzAzkwBPGAzM8lnEV5vyvzHmt6Ip3TeTMc77V6wcQzmu7653DhTvjX?= =?us-ascii?q?FUZHYC7GjLh5ko3+pgqxW7qkknzg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0HoAQD8P5ZXhxy3hNFdHAEBhHOlT5EKh?= =?us-ascii?q?AuGHQKBP0wBAQEBAQECAg8BAQEKCwkJGS+CMhWCFgIBA3kQUS0qGYgwtUcBAQg?= =?us-ascii?q?CJYYqhheDQoUPBZkojm8Cjz2QIYJwgVk6MokNAQEB?= X-IPAS-Result: =?us-ascii?q?A0HoAQD8P5ZXhxy3hNFdHAEBhHOlT5EKhAuGHQKBP0wBAQE?= =?us-ascii?q?BAQECAg8BAQEKCwkJGS+CMhWCFgIBA3kQUS0qGYgwtUcBAQgCJYYqhheDQoUPB?= =?us-ascii?q?Zkojm8Cjz2QIYJwgVk6MokNAQEB?= X-IronPort-AV: E=Sophos;i="5.28,420,1464652800"; d="scan'208";a="15901291" Received: from mx1.redhat.com ([209.132.183.28]) by emsm-gh1-uea10.nsa.gov with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2016 16:37:20 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E85E2D4E4E for ; Mon, 25 Jul 2016 16:37:12 +0000 (UTC) Received: from crude.brq.redhat.com (crude.brq.redhat.com [10.34.24.82]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6PGb9MP011547; Mon, 25 Jul 2016 12:37:12 -0400 From: Miroslav Vadkerti To: selinux@tycho.nsa.gov Subject: [PATCH 2/2] semanage: fix modify action in node and interface Date: Mon, 25 Jul 2016 18:37:07 +0200 Message-Id: <1469464627-2159-2-git-send-email-mvadkert@redhat.com> In-Reply-To: <1469464627-2159-1-git-send-email-mvadkert@redhat.com> References: <1469464627-2159-1-git-send-email-mvadkert@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 25 Jul 2016 16:37:12 +0000 (UTC) X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: Cc: linux-audit@redhat.com MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP The modify actions of security context mappings for interface and node actully called add action. Signed-off-by: Miroslav Vadkerti --- policycoreutils/semanage/semanage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policycoreutils/semanage/semanage b/policycoreutils/semanage/semanage index 954411d..b199ebe 100644 --- a/policycoreutils/semanage/semanage +++ b/policycoreutils/semanage/semanage @@ -524,7 +524,7 @@ def handleInterface(args): if args.action is "add": OBJECT.add(args.interface, args.range, args.type) if args.action is "modify": - OBJECT.add(args.interface, args.range, args.type) + OBJECT.modify(args.interface, args.range, args.type) if args.action is "delete": OBJECT.delete(args.interface) if args.action is "list": @@ -607,7 +607,7 @@ def handleNode(args): if args.action is "add": OBJECT.add(args.node, args.netmask, args.proto, args.range, args.type) if args.action is "modify": - OBJECT.add(args.node, args.netmask, args.proto, args.range, args.type) + OBJECT.modify(args.node, args.netmask, args.proto, args.range, args.type) if args.action is "delete": OBJECT.delete(args.node, args.netmask, args.proto) if args.action is "list":