From patchwork Tue Oct 16 08:25:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vit Mojzis X-Patchwork-Id: 10643223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A0A4112B for ; Tue, 16 Oct 2018 08:27:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8715628A73 for ; Tue, 16 Oct 2018 08:27:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AF2729976; Tue, 16 Oct 2018 08:27:19 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from uhil19pa09.eemsg.mail.mil (uhil19pa09.eemsg.mail.mil [214.24.21.82]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA256 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DA2CE2987F for ; Tue, 16 Oct 2018 08:27:18 +0000 (UTC) X-EEMSG-check-008: 325106725|UHIL19PA09_EEMSG_MP7.csd.disa.mil Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.3]) by uhil19pa09.eemsg.mail.mil with ESMTP/TLS/DHE-RSA-AES256-SHA256; 16 Oct 2018 08:27:18 +0000 X-IronPort-AV: E=Sophos;i="5.54,387,1534809600"; d="scan'208";a="19448120" IronPort-PHdr: 9a23:tgC7Qh2t2OPAAEGMsmDT+DRfVm0co7zxezQtwd8Zse8WKfvxwZ3uMQTl6Ol3ixeRBMOHs60C07KempujcFRI2YyGvnEGfc4EfD4+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knSgA1VXL75uKUOigsZTdF0uExBFHmuOG0g/TrHVKVUjK6XCPAP9DWcULAOAA1UNXZlThe03oh+U6e4lvBA9GVdl2Vyp+Z5/SZhQU6CuDGkgqUPyzM7sOWmsTIDq31eZv+TnyfBFRNIy/Fc3vRUMGrr9VHpOCpLV4D1+rQyYJ24r9Nz6mkjYRglYywNVPihDCe1la6TH4iTq4gB3Uywg+vkNO6LBHBDcLkwzAnsAX100wyYmRdsow5pCjmj7dpxIoK7NI5lwyezAmHUeR4K5b8Bq8r+s1MHDaM2ZFptzX8l052BQSsAF6mtU30tgF0CbmNJOIlG9QdcD7Mh1yiNuatU/xo8ejrYEo25vILXmJStuzEmVdk//mvNveWeg48ylnhsmtd69CmL7WoXcO7KUtREGHX/1o5Dj+f5YqbI0KgcUIUz8L26S7cZN9W7v2u73JI/Qki+2rEXBEa0KscG1u6dSSqpSWSEH++Mdjvp/X41N0fo7kywJ0YsIIdS+kk6NOaKip9HwgvmV741DinFv1LXzGU/d+gdcg8= X-IPAS-Result: A2ANAACQn8Vb/wHyM5BkGwEBAQEDAQEBBwMBAQGBUQYBAQELAYFZJwNmI1wojAxfi02ZFBSBXBcYAxABiTEhNA0NAQMBAQEBAQECAWwcDII2JIJgAwMBAjcUIA4DCQEBQAgIAwEtFREOCwUYBIJ/ASgBgVgDp0SFOoRoi0wXgUE/gRKHXQESAWyFDQKOPUCPLQmGGYo3CxeJHocAjnuHMoFDOGRxTSMVO4JsCYpMhgNtgQUBAYgigj4BAQ Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 16 Oct 2018 08:27:17 +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 w9G8RGVq024907; Tue, 16 Oct 2018 04:27:17 -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 w9G8Q6HD003674 for ; Tue, 16 Oct 2018 04:26:06 -0400 Received: from goalie.tycho.ncsc.mil (goalie.tycho.ncsc.mil [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w9G8Q32R024878 for ; Tue, 16 Oct 2018 04:26:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1ANAABQn8VblywaGNZkHAEBAQQBAQcEAQGBUQcBAQsBgVknaX8ojAxfi02ZFIF6DRuEUQKEbyE0DQ0BAwEBAQEBAQIUAQEBAQEGGAZMhUYDA4EJUVeDOQEoAYFbp0KFOoRoi0wXgUE/gRKIXYUNAo49j20JhhmKNwsXiR6HAI57hzKBQ4INTSMVO4JsCYIrGogHhgNti2cBAQ X-IPAS-Result: A1ANAABQn8VblywaGNZkHAEBAQQBAQcEAQGBUQcBAQsBgVknaX8ojAxfi02ZFIF6DRuEUQKEbyE0DQ0BAwEBAQEBAQIUAQEBAQEGGAZMhUYDA4EJUVeDOQEoAYFbp0KFOoRoi0wXgUE/gRKIXYUNAo49j20JhhmKNwsXiR6HAI57hzKBQ4INTSMVO4JsCYIrGogHhgNti2cBAQ X-IronPort-AV: E=Sophos;i="5.54,387,1534824000"; d="scan'208";a="392916" Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.34]) by goalie.tycho.ncsc.mil with ESMTP; 16 Oct 2018 04:26:05 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ALAAARoMVblywaGNZkHAEBAQQBAQcEAQGBUQcBAQsBgVknaX8ojAxfpGGBeg0bhFEChRA0DQ0BAwEBAQEBAQIBEwEBAQEBBhgGTAyCNiKCYgMDgQlRV4M5ASgBgVunSIU6hGiLY4FBP4ESiF2FDQKOPY9tCYYZijcLF4kehwCOe4cygUOCDU0jFTuCbAmCKxqIB4YDPTCLZwEB X-IPAS-Result: A0ALAAARoMVblywaGNZkHAEBAQQBAQcEAQGBUQcBAQsBgVknaX8ojAxfpGGBeg0bhFEChRA0DQ0BAwEBAQEBAQIBEwEBAQEBBhgGTAyCNiKCYgMDgQlRV4M5ASgBgVunSIU6hGiLY4FBP4ESiF2FDQKOPY9tCYYZijcLF4kehwCOe4cygUOCDU0jFTuCbAmCKxqIB4YDPTCLZwEB X-IronPort-AV: E=Sophos;i="5.54,387,1534809600"; d="scan'208";a="16851484" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from uphb3cpa05.eemsg.mail.mil (HELO USFB19PA19.eemsg.mail.mil) ([214.24.26.44]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 16 Oct 2018 08:26:05 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;396b99e8-647b-476a-bd5f-9fc449327ed6 Authentication-Results: USFB19PA09.eemsg.mail.mil; dkim=none (message not signed) header.i=none; spf=None smtp.pra=vmojzis@redhat.com; spf=Pass smtp.mailfrom=vmojzis@redhat.com; spf=Pass smtp.helo=postmaster@mx1.redhat.com; dmarc=pass (p=none dis=none) d=redhat.com X-EEMSG-check-008: 59519084|USFB19PA09_EEMSG_MP5.csd.disa.mil X-EEMSG-SBRS: 3.5 X-EEMSG-ORIG-IP: 209.132.183.28 X-EEMSG-check-002: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ARAACQn8Vbhxy3hNFkHAECBAEIBAGBUgcBDAGBWYEQfyiMDF+LTZkUgXoNGxABhEAChG8aBgEEMA0NAQMBAQEBAQEBAQETAQEBCgsJCCkjDII2IoJiAwOBCVFXgzkBKAGBWKdHhTqEaItMF4FBP4ESiF2FDQKOPY9tCYYZijcLF4kehwCOe4cygUOCDU0jFTuCbAmCK4ghhgM9MIEhAQGKRAEB X-IPAS-Result: A0ARAACQn8Vbhxy3hNFkHAECBAEIBAGBUgcBDAGBWYEQfyiMDF+LTZkUgXoNGxABhEAChG8aBgEEMA0NAQMBAQEBAQEBAQETAQEBCgsJCCkjDII2IoJiAwOBCVFXgzkBKAGBWKdHhTqEaItMF4FBP4ESiF2FDQKOPY9tCYYZijcLF4kehwCOe4cygUOCDU0jFTuCbAmCK4ghhgM9MIEhAQGKRAEB Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B9C00313D97E for ; Tue, 16 Oct 2018 08:25:58 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-204-163.brq.redhat.com [10.40.204.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id 167E5100164E for ; Tue, 16 Oct 2018 08:25:57 +0000 (UTC) X-EEMSG-check-009: 444-444 From: Vit Mojzis To: selinux@tycho.nsa.gov Date: Tue, 16 Oct 2018 10:25:39 +0200 Message-Id: <20181016082541.21615-2-vmojzis@redhat.com> In-Reply-To: <20181016082541.21615-1-vmojzis@redhat.com> References: <20181016082541.21615-1-vmojzis@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 16 Oct 2018 08:25:58 +0000 (UTC) Subject: [PATCH 1/3] python/sepolicy: Fix "info" to search aliases as well X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP Restore previous behaviour of "sepolicy.info()". --- python/sepolicy/sepolicy/__init__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py index 5d0535b9..8484b28c 100644 --- a/python/sepolicy/sepolicy/__init__.py +++ b/python/sepolicy/sepolicy/__init__.py @@ -168,15 +168,21 @@ except ValueError as e: def info(setype, name=None): if setype == TYPE: q = setools.TypeQuery(_pol) - if name: - q.name = name + q.name = name + results = list(q.results()) + + if name and len(results) < 1: + #type not found, try alias + q.name = None + q.alias = name + results = list(q.results()) return ({ 'aliases': list(map(str, x.aliases())), 'name': str(x), 'permissive': bool(x.ispermissive), 'attributes': list(map(str, x.attributes())) - } for x in q.results()) + } for x in results) elif setype == ROLE: q = setools.RoleQuery(_pol) From patchwork Tue Oct 16 08:25:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vit Mojzis X-Patchwork-Id: 10643221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 112FE925 for ; Tue, 16 Oct 2018 08:27:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F07BD28A73 for ; Tue, 16 Oct 2018 08:27:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E346829980; Tue, 16 Oct 2018 08:27:18 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from uhil19pa09.eemsg.mail.mil (uhil19pa09.eemsg.mail.mil [214.24.21.82]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA256 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1E56A28A73 for ; Tue, 16 Oct 2018 08:27:17 +0000 (UTC) X-EEMSG-check-008: 325106714|UHIL19PA09_EEMSG_MP7.csd.disa.mil Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.3]) by uhil19pa09.eemsg.mail.mil with ESMTP/TLS/DHE-RSA-AES256-SHA256; 16 Oct 2018 08:27:16 +0000 X-IronPort-AV: E=Sophos;i="5.54,387,1534809600"; d="scan'208";a="19448115" IronPort-PHdr: 9a23:KKu5ehzNJeMAtprXCy+O+j09IxM/srCxBDY+r6Qd1uoSK/ad9pjvdHbS+e9qxAeQG9mDtLQc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q99pHPYQhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb5Q6o0WTC/5Kl1ThHmhjoMOzog/G3KlsB8iaRWqw+jqRNi2Y7ZeIGbOuRwcK3ef9waS3dPXt5TWiBcDI6zYJcAAeUfMuZDtIT9u1kDoAGiCQWwGO/j1DlFjWL2060g1OQhFBnL0wMhH9ISrX/aq9L1NKUTUOC016nD0DLOb+1T2Tf66ojJcxEhoeqXULJqb8Xe1EkvGBnZjlmKtYPlODaV2/0LvmOG7ORgTfqih3Mopgx+uDSixtoghpPXio8a1FzI7zh1zJ4rKdGkTEN3e8OoHZVOuy2AKod7Qc0vT3t2tCs5zLANpIS1czIQyJs9wh7Sc/mHc4+V7R39TOuROjJ4hG59eLK4mhay7VCsyu3iWcmw11ZHtjZFncPWtnAMyhzT8dKLSud9/0i92TaP0Brf6udYLkAviaXXMZshwr80lpYLsETDGDH5mFnugaOLeUgp9fKk5uT6brn8uJOROJF4hhvjPqg2n8ywG+U4MgwAX2iB/uS80aXu/VbnT7VOj/02lLTZsZ/DKcsAoa65HglV3Zo95BakFDqmzNQZkmUHLFJCYh6HiZPpNEvULPD3Cve/nUygkC13yPDeIr3h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B Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 16 Oct 2018 08:27:14 +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 w9G8RC7v024897; Tue, 16 Oct 2018 04:27:14 -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 w9G8Q31m003671 for ; Tue, 16 Oct 2018 04:26:03 -0400 Received: from goalie.tycho.ncsc.mil (goalie.tycho.ncsc.mil [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w9G8Q32Q024878 for ; Tue, 16 Oct 2018 04:26:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1ATAABQn8Vbly0YGNZkHQEBBQEHBQGBUQgBCwGBWSdpfyiMDF+LTZkUgXoNGxGEQAKEbyE0DQ0BAwEBAQEBAQIUAQEBAQEGGAZMhUYDA4EJUVeDOQEoAYFYA6dChTqEaItMF4FBP4lvhQ0Cjj2PbQmGGTyJewsXghuHA4cAli2BQ4INTSMVgycJgisaiRuEb22BI4pEAQE X-IPAS-Result: A1ATAABQn8Vbly0YGNZkHQEBBQEHBQGBUQgBCwGBWSdpfyiMDF+LTZkUgXoNGxGEQAKEbyE0DQ0BAwEBAQEBAQIUAQEBAQEGGAZMhUYDA4EJUVeDOQEoAYFYA6dChTqEaItMF4FBP4lvhQ0Cjj2PbQmGGTyJewsXghuHA4cAli2BQ4INTSMVgycJgisaiRuEb22BI4pEAQE X-IronPort-AV: E=Sophos;i="5.54,387,1534824000"; d="scan'208";a="392915" Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.34]) by goalie.tycho.ncsc.mil with ESMTP; 16 Oct 2018 04:26:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ATAAARoMVbly0YGNZkHQEBBQEHBQGBUQgBCwGBWSdpfyiMDF+LTZkUgXoNGxGEQAKEbyE0DQ0BAwEBAQEBAQIBEwEBAQEBBhgGTAyCNiKCYgMDgQlRV4M5ASgBgVgDp0iFOoRoi0wXgUE/iW+FDQKOPY9tCYYZPIl7CxeCG4cDhwCWLYFDgg1NIxWDJwmCKxqJG4RvbYEjikQBAQ X-IPAS-Result: A0ATAAARoMVbly0YGNZkHQEBBQEHBQGBUQgBCwGBWSdpfyiMDF+LTZkUgXoNGxGEQAKEbyE0DQ0BAwEBAQEBAQIBEwEBAQEBBhgGTAyCNiKCYgMDgQlRV4M5ASgBgVgDp0iFOoRoi0wXgUE/iW+FDQKOPY9tCYYZPIl7CxeCG4cDhwCWLYFDgg1NIxWDJwmCKxqJG4RvbYEjikQBAQ X-IronPort-AV: E=Sophos;i="5.54,387,1534809600"; d="scan'208";a="16851483" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from ucol3cpa07.eemsg.mail.mil ([214.24.24.45]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 16 Oct 2018 08:26:02 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;e53cbb17-a347-46b4-9429-e6c276482a2e Authentication-Results: ucol19pa15.eemsg.mail.mil; dkim=none (message not signed) header.i=none; spf=None smtp.pra=vmojzis@redhat.com; spf=Pass smtp.mailfrom=vmojzis@redhat.com; spf=Pass smtp.helo=postmaster@mx1.redhat.com; dmarc=pass (p=none dis=none) d=redhat.com X-EEMSG-check-008: 603286768|UCOL19PA15_EEMSG_MP13.csd.disa.mil X-EEMSG-SBRS: 3.5 X-EEMSG-ORIG-IP: 209.132.183.28 X-EEMSG-check-002: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AZAABQn8Vbhxy3hNFkHQIFCAWBUggMAYFZgRB/KIwMX4tNmRSBeg0bEAGEQAKEbxoGAQQwDQ0BAwEBAQEBAQEBARMBAQEKCwkIKSMMgjYigmIDA4EJUVeDOQEoAYFYp0WFOoRoi0wXgUE/g3aFeYUNAo49j20Jhhk8iXsLF4IbhwOHAJYtgUOCDU0jFYMnCYIriTWEbz0wgSEBAYpEAQE X-IPAS-Result: A0AZAABQn8Vbhxy3hNFkHQIFCAWBUggMAYFZgRB/KIwMX4tNmRSBeg0bEAGEQAKEbxoGAQQwDQ0BAwEBAQEBAQEBARMBAQEKCwkIKSMMgjYigmIDA4EJUVeDOQEoAYFYp0WFOoRoi0wXgUE/g3aFeYUNAo49j20Jhhk8iXsLF4IbhwOHAJYtgUOCDU0jFYMnCYIriTWEbz0wgSEBAYpEAQE Received: from mx1.redhat.com ([209.132.183.28]) by ucol19pa15.eemsg.mail.mil with ESMTP/TLS/DHE-RSA-AES256-SHA256; 16 Oct 2018 08:26:01 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6B8DF89C47 for ; Tue, 16 Oct 2018 08:26:00 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-204-163.brq.redhat.com [10.40.204.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF3F8100164E for ; Tue, 16 Oct 2018 08:25:59 +0000 (UTC) X-EEMSG-check-009: 444-444 From: Vit Mojzis To: selinux@tycho.nsa.gov Date: Tue, 16 Oct 2018 10:25:40 +0200 Message-Id: <20181016082541.21615-3-vmojzis@redhat.com> In-Reply-To: <20181016082541.21615-1-vmojzis@redhat.com> References: <20181016082541.21615-1-vmojzis@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 16 Oct 2018 08:26:00 +0000 (UTC) Subject: [PATCH 2/3] python/sepolicy: Stop rejecting aliases in sepolicy commands X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP Fix CheckDomain and CheckPortType classes to properly deal with aliases. Resolves: rhbz#1600009 --- python/sepolicy/sepolicy.py | 8 +++----- python/sepolicy/sepolicy/__init__.py | 10 +++++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/python/sepolicy/sepolicy.py b/python/sepolicy/sepolicy.py index a000c1ad..01380fbe 100755 --- a/python/sepolicy/sepolicy.py +++ b/python/sepolicy/sepolicy.py @@ -60,8 +60,6 @@ class CheckPath(argparse.Action): class CheckType(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): - domains = sepolicy.get_all_domains() - if isinstance(values, str): setattr(namespace, self.dest, values) else: @@ -103,7 +101,7 @@ class CheckDomain(argparse.Action): domains = sepolicy.get_all_domains() if isinstance(values, str): - if values not in domains: + if sepolicy.get_real_type_name(values) not in domains: raise ValueError("%s must be an SELinux process domain:\nValid domains: %s" % (values, ", ".join(domains))) setattr(namespace, self.dest, values) else: @@ -112,7 +110,7 @@ class CheckDomain(argparse.Action): newval = [] for v in values: - if v not in domains: + if sepolicy.get_real_type_name(v) not in domains: raise ValueError("%s must be an SELinux process domain:\nValid domains: %s" % (v, ", ".join(domains))) newval.append(v) setattr(namespace, self.dest, newval) @@ -167,7 +165,7 @@ class CheckPortType(argparse.Action): if not newval: newval = [] for v in values: - if v not in port_types: + if sepolicy.get_real_type_name(v) not in port_types: raise ValueError("%s must be an SELinux port type:\nValid port types: %s" % (v, ", ".join(port_types))) newval.append(v) setattr(namespace, self.dest, values) diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py index 8484b28c..0da3917b 100644 --- a/python/sepolicy/sepolicy/__init__.py +++ b/python/sepolicy/sepolicy/__init__.py @@ -447,6 +447,14 @@ def get_file_types(setype): return mpaths +# determine if entered type is an alias +# and return corresponding type name +def get_real_type_name(name): + try: + return next(info(TYPE, name))["name"] + except (RuntimeError, StopIteration): + return None + def get_writable_files(setype): file_types = get_all_file_types() all_writes = [] @@ -1061,7 +1069,7 @@ def gen_short_name(setype): domainname = setype[:-2] else: domainname = setype - if domainname + "_t" not in all_domains: + if get_real_type_name(domainname + "_t") not in all_domains: raise ValueError("domain %s_t does not exist" % domainname) if domainname[-1] == 'd': short_name = domainname[:-1] + "_" From patchwork Tue Oct 16 08:25:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vit Mojzis X-Patchwork-Id: 10643225 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8DC96925 for ; Tue, 16 Oct 2018 08:27:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A54C28A73 for ; Tue, 16 Oct 2018 08:27:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E7EC29976; Tue, 16 Oct 2018 08:27:23 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from uhil19pa09.eemsg.mail.mil (uhil19pa09.eemsg.mail.mil [214.24.21.82]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA256 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF1F628A73 for ; Tue, 16 Oct 2018 08:27:21 +0000 (UTC) X-EEMSG-check-008: 325106739|UHIL19PA09_EEMSG_MP7.csd.disa.mil Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.3]) by uhil19pa09.eemsg.mail.mil with ESMTP/TLS/DHE-RSA-AES256-SHA256; 16 Oct 2018 08:27:20 +0000 X-IronPort-AV: E=Sophos;i="5.54,387,1534809600"; d="scan'208";a="19448127" IronPort-PHdr: 9a23:mLqvPBKNUGV9QRAMk9mcpTZWNBhigK39O0sv0rFitYgTKvj6rarrMEGX3/hxlliBBdydt6obzbKO+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxlKiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPdeRWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbYUwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr86QzSi67pgRgHuhikJKjU19HjbhtFsgK5eph+quh5xzJPOYIyNNPRwYK3Tc9AYSmpPQ8hRTy5MDp6yYoQAE+UPMvhXr5LmqlsSrxazHxWgCP/zxjNWgHL9wK000/4mEQHDxAEvENMOsGjJp9vyM6cSU+G0zKjTzT7eaP5WxzL96I/KchEgoPGMRql9cdDPxkYyFwPKlEmQpZb5MDOS0+QAqm6W5PdjW+K3k2Mrtg58rze1ysosl4XFnJwZx1/a+Slj3Yo5PcO0RFJ/bNK+DZdduT+WO5FrTs4hTWxkojg2x74AtJWmZiYF0o4nyATaa/GfdoiI5Q/sW/iJLDdjgXJlZKq/hxGv8Ui80uH8Vte70FJNriddjtnDrGoN1x3O6sicUPd94keg1iqP1wDU8O1EJ1w7lbHHJJI7x74wl54TvVzCHi/whkr2kLebelgr9+Wn8ejqYqjqqoWCO4J7lA3yKLkiltS6AesiMwgOW2ab+f671L3m5UD5W6tFjvk3kqnfrZDbKt0XqbW+Aw9I1IYs9wiwDyy93dQEnXgIMFJFe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HAJYtgUoNJGRxTSMVO4JsCYtghG9tgQUBARyHeQ0XB4IgAQE Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 16 Oct 2018 08:27:20 +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 w9G8RJ1s024917; Tue, 16 Oct 2018 04:27:19 -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 w9G8QCXC003677 for ; Tue, 16 Oct 2018 04:26:12 -0400 Received: from goalie.tycho.ncsc.mil (goalie.tycho.ncsc.mil [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w9G8QBR1024883 for ; Tue, 16 Oct 2018 04:26:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1BjAQBQn8VblywVGNZkH4F4gVonaX8ojGuLTZAgiHSBeg0bEYRAAoRvITUMDQEDAQEBAQEBAhQBAQEBAQYYBkyFRgMDgQlRV4M5ASgBgVgDp0KFOoRoi0wXgUE/g2+CCYkEAoholUIJhhk8iXsLF4IbhwOHAJYtgUUBggpNIxU7gmwJgisaiRuEb22BI4d5K4IgAQE X-IPAS-Result: A1BjAQBQn8VblywVGNZkH4F4gVonaX8ojGuLTZAgiHSBeg0bEYRAAoRvITUMDQEDAQEBAQEBAhQBAQEBAQYYBkyFRgMDgQlRV4M5ASgBgVgDp0KFOoRoi0wXgUE/g2+CCYkEAoholUIJhhk8iXsLF4IbhwOHAJYtgUUBggpNIxU7gmwJgisaiRuEb22BI4d5K4IgAQE X-IronPort-AV: E=Sophos;i="5.54,387,1534824000"; d="scan'208";a="392917" Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.35]) by goalie.tycho.ncsc.mil with ESMTP; 16 Oct 2018 04:26:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BkAQCQn8VblywVGNZkH4F4gVonaX8ojGuLTZAgiHSBeg0bEYRAAoRvITUMDQEDAQEBAQEBAgETAQEBAQEGGAZMDII2IoJiAwOBCVFXgzkBKAGBWAOnRIU6hGiLTBeBQT+Db4IJiQQCiGiVQgmGGTyJewsXghuHA4cAli2BRQGCCk0jFTuCbAmCKxqJG4RvbYEjh3krgiABAQ X-IPAS-Result: A0BkAQCQn8VblywVGNZkH4F4gVonaX8ojGuLTZAgiHSBeg0bEYRAAoRvITUMDQEDAQEBAQEBAgETAQEBAQEGGAZMDII2IoJiAwOBCVFXgzkBKAGBWAOnRIU6hGiLTBeBQT+Db4IJiQQCiGiVQgmGGTyJewsXghuHA4cAli2BRQGCCk0jFTuCbAmCKxqJG4RvbYEjh3krgiABAQ X-IronPort-AV: E=Sophos;i="5.54,387,1534809600"; d="scan'208";a="19448107" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from uhil3cpa05.eemsg.mail.mil ([214.24.21.44]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 16 Oct 2018 08:26:10 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;2458a6e4-14c0-4897-91e4-13f01f84865c Authentication-Results: uhil19pa05.eemsg.mail.mil; dkim=none (message not signed) header.i=none; spf=None smtp.pra=vmojzis@redhat.com; spf=Pass smtp.mailfrom=vmojzis@redhat.com; spf=Pass smtp.helo=postmaster@mx1.redhat.com; dmarc=pass (p=none dis=none) d=redhat.com X-EEMSG-check-008: 318134344|UHIL19PA05_EEMSG_MP3.csd.disa.mil X-EEMSG-SBRS: 3.5 X-EEMSG-ORIG-IP: 209.132.183.28 X-EEMSG-check-002: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A6AABOoMVbhxy3hNFkHQIFCAWBVAYMAYFZgRB/KIxri02QIIh0gXoNGxABhEAChG8aBgEEMgsNAQMBAQEBAQEBAQETAQEBCgsJCCkjDII2IoJiAwOBCVFXgzkBKAGBWKdMhTqEaItMF4FBP4NvB4ICiQQCiGiVQgmGGTyJewsXghuHA4cAli2BSQGCBk0jFTuCbAmCK4k1hG89MIEhAQGHeSuCIAEB X-IPAS-Result: A0A6AABOoMVbhxy3hNFkHQIFCAWBVAYMAYFZgRB/KIxri02QIIh0gXoNGxABhEAChG8aBgEEMgsNAQMBAQEBAQEBAQETAQEBCgsJCCkjDII2IoJiAwOBCVFXgzkBKAGBWKdMhTqEaItMF4FBP4NvB4ICiQQCiGiVQgmGGTyJewsXghuHA4cAli2BSQGCBk0jFTuCbAmCK4k1hG89MIEhAQGHeSuCIAEB Received: from mx1.redhat.com ([209.132.183.28]) by uhil19pa05.eemsg.mail.mil with ESMTP/TLS/DHE-RSA-AES256-SHA256; 16 Oct 2018 08:26:04 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B410530C811E for ; Tue, 16 Oct 2018 08:26:02 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-204-163.brq.redhat.com [10.40.204.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E7F31084181 for ; Tue, 16 Oct 2018 08:26:01 +0000 (UTC) X-EEMSG-check-009: 444-444 From: Vit Mojzis To: selinux@tycho.nsa.gov Date: Tue, 16 Oct 2018 10:25:41 +0200 Message-Id: <20181016082541.21615-4-vmojzis@redhat.com> In-Reply-To: <20181016082541.21615-1-vmojzis@redhat.com> References: <20181016082541.21615-1-vmojzis@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 16 Oct 2018 08:26:02 +0000 (UTC) Subject: [PATCH 3/3] python/semanage: Stop rejecting aliases in semanage commands X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP Resolves: rhbz#1544793 --- python/semanage/seobject.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py index c1467185..5d34cdbe 100644 --- a/python/semanage/seobject.py +++ b/python/semanage/seobject.py @@ -1081,7 +1081,7 @@ class portRecords(semanageRecords): if type == "": raise ValueError(_("Type is required")) - if type not in self.valid_types: + if sepolicy.get_real_type_name(type) not in self.valid_types: raise ValueError(_("Type %s is invalid, must be a port type") % type) (k, proto_d, low, high) = self.__genkey(port, proto) @@ -1145,7 +1145,7 @@ class portRecords(semanageRecords): else: raise ValueError(_("Requires setype")) - if setype and setype not in self.valid_types: + if setype and sepolicy.get_real_type_name(setype) not in self.valid_types: raise ValueError(_("Type %s is invalid, must be a port type") % setype) (k, proto_d, low, high) = self.__genkey(port, proto) @@ -1349,7 +1349,7 @@ class ibpkeyRecords(semanageRecords): if type == "": raise ValueError(_("Type is required")) - if type not in self.valid_types: + if sepolicy.get_real_type_name(type) not in self.valid_types: raise ValueError(_("Type %s is invalid, must be a ibpkey type") % type) (k, subnet_prefix, low, high) = self.__genkey(pkey, subnet_prefix) @@ -1411,7 +1411,7 @@ class ibpkeyRecords(semanageRecords): else: raise ValueError(_("Requires setype")) - if setype and setype not in self.valid_types: + if setype and sepolicy.get_real_type_name(setype) not in self.valid_types: raise ValueError(_("Type %s is invalid, must be a ibpkey type") % setype) (k, subnet_prefix, low, high) = self.__genkey(pkey, subnet_prefix) @@ -1597,7 +1597,7 @@ class ibendportRecords(semanageRecords): if type == "": raise ValueError(_("Type is required")) - if type not in self.valid_types: + if sepolicy.get_real_type_name(type) not in self.valid_types: raise ValueError(_("Type %s is invalid, must be an ibendport type") % type) (k, ibendport, port) = self.__genkey(ibendport, ibdev_name) @@ -1658,7 +1658,7 @@ class ibendportRecords(semanageRecords): else: raise ValueError(_("Requires setype")) - if setype and setype not in self.valid_types: + if setype and sepolicy.get_real_type_name(setype) not in self.valid_types: raise ValueError(_("Type %s is invalid, must be an ibendport type") % setype) (k, ibdev_name, port) = self.__genkey(ibendport, ibdev_name) @@ -1847,7 +1847,7 @@ class nodeRecords(semanageRecords): if ctype == "": raise ValueError(_("SELinux node type is required")) - if ctype not in self.valid_types: + if sepolicy.get_real_type_name(ctype) not in self.valid_types: raise ValueError(_("Type %s is invalid, must be a node type") % ctype) (rc, k) = semanage_node_key_create(self.sh, addr, mask, proto) @@ -1916,7 +1916,7 @@ class nodeRecords(semanageRecords): if serange == "" and setype == "": raise ValueError(_("Requires setype or serange")) - if setype and setype not in self.valid_types: + if setype and sepolicy.get_real_type_name(setype) not in self.valid_types: raise ValueError(_("Type %s is invalid, must be a node type") % setype) (rc, k) = semanage_node_key_create(self.sh, addr, mask, proto) @@ -2235,7 +2235,6 @@ class fcontextRecords(semanageRecords): try: valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "file_type"))[0]["types"]) valid_types += list(list(sepolicy.info(sepolicy.ATTRIBUTE, "device_node"))[0]["types"]) - valid_types.append("<>") except RuntimeError: valid_types = [] @@ -2363,7 +2362,7 @@ class fcontextRecords(semanageRecords): if type == "": raise ValueError(_("SELinux Type is required")) - if type not in self.valid_types: + if type != "<>" and sepolicy.get_real_type_name(type) not in self.valid_types: raise ValueError(_("Type %s is invalid, must be a file or device type") % type) (rc, k) = semanage_fcontext_key_create(self.sh, target, file_types[ftype]) @@ -2426,7 +2425,7 @@ class fcontextRecords(semanageRecords): def __modify(self, target, setype, ftype, serange, seuser): if serange == "" and setype == "" and seuser == "": raise ValueError(_("Requires setype, serange or seuser")) - if setype and setype not in self.valid_types: + if setype not in ["", "<>"] and sepolicy.get_real_type_name(setype) not in self.valid_types: raise ValueError(_("Type %s is invalid, must be a file or device type") % setype) self.validate(target)