From patchwork Wed Oct 9 14:20:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Smalley X-Patchwork-Id: 11181267 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C19717D4 for ; Wed, 9 Oct 2019 14:20:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6C3BD218AC for ; Wed, 9 Oct 2019 14:20:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=tycho.nsa.gov header.i=@tycho.nsa.gov header.b="dkvlmN3p" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731307AbfJIOUf (ORCPT ); Wed, 9 Oct 2019 10:20:35 -0400 Received: from UHIL19PA37.eemsg.mail.mil ([214.24.21.196]:49525 "EHLO UHIL19PA37.eemsg.mail.mil" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728019AbfJIOUe (ORCPT ); Wed, 9 Oct 2019 10:20:34 -0400 X-EEMSG-check-017: 35220246|UHIL19PA37_ESA_OUT03.csd.disa.mil X-IronPort-AV: E=Sophos;i="5.67,276,1566864000"; d="scan'208";a="35220246" Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.2]) by UHIL19PA37.eemsg.mail.mil with ESMTP/TLS/DHE-RSA-AES256-SHA256; 09 Oct 2019 14:20:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho.nsa.gov; i=@tycho.nsa.gov; q=dns/txt; s=tycho.nsa.gov; t=1570630833; x=1602166833; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=d2azdq9tjJjwV9XjURlDxTY7r7O2zHljmh88+Dkb/io=; b=dkvlmN3pUspzh+E9ucMWfKNZskioMqrRPF0Bpd6xQw4TkXxOTJ74RX0x StqA8MzRDSYKPQvbCudk9aipr7zKK1fc1F9nNlwUv3788K9XipY9OQK72 tl2WtKRgOHUEsy+npbs6Y+L8spZ1Ttel+GH7u72Nv2KD/t3Hlra0Si+Eh Oevo6vB4jIbD5RACaJRZxaYDz/SRjcESegBARkc1bmLpEe5P/lGWZ0iNY PeFsLjn7wV37qRROvrswIj9r1iWYWh7udz471sR9t2UMeUYChlUuTJlRY v1FSGKn1IYCTwlQ+nX5AH1i9lqqUpjki6HN0TNNTCqR+fqls7U4Rxq3Ay w==; X-IronPort-AV: E=Sophos;i="5.67,276,1566864000"; d="scan'208";a="28812121" IronPort-PHdr: 9a23:RVkYYx9C+mfeOf9uRHKM819IXTAuvvDOBiVQ1KB32uwcTK2v8tzYMVDF4r011RmVBN6dtasP1rKempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffgtFiCC8bL9vIxm7rRndvdQKjIV/Lao81gHHqWZSdeRMwmNoK1OTnxLi6cq14ZVu7Sdete8/+sBZSan1cLg2QrJeDDQ9LmA6/9brugXZTQuO/XQTTGMbmQdVDgff7RH6WpDxsjbmtud4xSKXM9H6QawyVD+/4ahrUhvogzoZOTA//m/cl8h8gLtVrR+lohByxZPfboOIO/pkZq7Tfc0US3dPUMhSUCJODYyyYpATA+cCJ+tUs5Pwq0cSoRa4GAKiBPnvyjhNhnLuwKM6z/ouERnG3AM+GdIFrWnarNDvO6cWVeC60qnJxijEYvNNxDj985PFcgwhoP6QXbJwdtDdyU80FwzflFmQpovlPy2M2+kLrmOV4e1gVee1hG4mrQF8ujevxsYwionJm4Ia0UrI+jl+wIYwI9CzVU11Yca8HZdNuCyXOJF6T8M/T21ypio3xaMKtYSmcCUM1Z8p3QTQa+adfIiN+h/jUeGRLipmi399Y7K/ggqy8VCnyu3hSsm4yFZKoTRBktnLrn0Nywbc6tKGSvtg5UetwyqP1gDP5eFEJkA4j6zbJII6wrEsjJYTtEXDHivulEX3iq+ZaFkk9/C15+nobbjqvJ+RO5Juhg3gPakihNazDfkgPggLRWeb+OC81LP5/U3+RbVHluY2nbTCsJ3BOcQaprK2Aw9S0oo57Ra/FC2p3M4XnXkAMlJJYAiHgJTxO1HSPPD4Cu+yg0yokDhx2vDGIqfhDY7XIXXYirfuY6ty605Gxwov19xQ+5VUCrQZKvLpRkDxrMDYDgM+MwGsxebnCcly1oQaWW2VGa+VKqLSsViP5uI0OOmBf4oVtTnyKvQ/4P7ul3A5k0cHfaa1xZsXdGy4HvN+LkWCf3XshtYBEWEXvgsxV+HqllKCXiBJZ3qoXKIz+Cs7CIS4AofHXIyth6aB3CjoVqFRM3tLDlGKDGfAaYqJQbEPZTiUL8snlSYLBpa7TIp07g2jrA/3zfJcK+PQ/iAJ/cb42MNd+/zYlRZ08yd9ScuazTfeHClPgmoUSmpuj+hEqktnxwLGivl1 X-IPAS-Result: A2DPCAD96p1d/wHyM5BlHgELHIFwC4F0Km1SATIqk1AGiy6PM4F7CQEBAQEBAQEBARsQCQECAQGDe0WCUSM0CQ4CDAEBAQQBAQEBAQUDAQFshS0MgjopgyEBRoFRgmM/AYF2FA+xVIVNgzCBSIE0hzWEWRh4gQeEYYJhAoEqgQSFGQStQ4Isgi+EWY4FDBuDLJYUlk+TDjmBWCsIAhgIIQ+DJwlHEBSFQoVlhQolAzCBBgEBkQmCVAEB Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 09 Oct 2019 14:20:32 +0000 Received: from moss-pluto.infosec.tycho.ncsc.mil (moss-pluto [192.168.25.131]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id x99EKU5R016518; Wed, 9 Oct 2019 10:20:30 -0400 From: Stephen Smalley To: selinux@vger.kernel.org Cc: nicolas.iooss@m4x.org, plautrba@redhat.com, Stephen Smalley Subject: [PATCH v2] python/sepolicy: call segenxml.py with python3 Date: Wed, 9 Oct 2019 10:20:24 -0400 Message-Id: <20191009142024.9278-1-sds@tycho.nsa.gov> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Fixes: https://github.com/SELinuxProject/selinux/issues/61 Signed-off-by: Stephen Smalley Acked-by: Nicolas Iooss --- v2 wraps basedir + filename in parentheses as per Nicolas Iooss' suggestion. python/sepolicy/sepolicy/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sepolicy/sepolicy/interface.py b/python/sepolicy/sepolicy/interface.py index 583091ae18aa..187419fa7822 100644 --- a/python/sepolicy/sepolicy/interface.py +++ b/python/sepolicy/sepolicy/interface.py @@ -196,7 +196,7 @@ def get_xml_file(if_file): from subprocess import getstatusoutput basedir = os.path.dirname(if_file) + "/" filename = os.path.basename(if_file).split(".")[0] - rc, output = getstatusoutput("python /usr/share/selinux/devel/include/support/segenxml.py -w -m %s" % basedir + filename) + rc, output = getstatusoutput("/usr/bin/python3 /usr/share/selinux/devel/include/support/segenxml.py -w -m %s" % (basedir + filename)) if rc != 0: sys.stderr.write("\n Could not proceed selected interface file.\n") sys.stderr.write("\n%s" % output)