SELinux Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] python/sepolicy: call segenxml.py with python3
@ 2019-10-09 14:20 Stephen Smalley
  2019-10-10 19:48 ` Nicolas Iooss
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Smalley @ 2019-10-09 14:20 UTC (permalink / raw)
  To: selinux; +Cc: nicolas.iooss, plautrba, Stephen Smalley

Fixes: https://github.com/SELinuxProject/selinux/issues/61
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
---
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)
-- 
2.21.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] python/sepolicy: call segenxml.py with python3
  2019-10-09 14:20 [PATCH v2] python/sepolicy: call segenxml.py with python3 Stephen Smalley
@ 2019-10-10 19:48 ` Nicolas Iooss
  2019-10-15 14:17   ` Stephen Smalley
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Iooss @ 2019-10-10 19:48 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: SElinux list, Petr Lautrbach

On Wed, Oct 9, 2019 at 4:20 PM Stephen Smalley <sds@tycho.nsa.gov> wrote:
>
> Fixes: https://github.com/SELinuxProject/selinux/issues/61
> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
> ---
> v2 wraps basedir + filename in parentheses as per Nicolas Iooss' suggestion.

Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>

>
>  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)
> --
> 2.21.0
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] python/sepolicy: call segenxml.py with python3
  2019-10-10 19:48 ` Nicolas Iooss
@ 2019-10-15 14:17   ` Stephen Smalley
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Smalley @ 2019-10-15 14:17 UTC (permalink / raw)
  To: Nicolas Iooss; +Cc: SElinux list, Petr Lautrbach

On 10/10/19 3:48 PM, Nicolas Iooss wrote:
> On Wed, Oct 9, 2019 at 4:20 PM Stephen Smalley <sds@tycho.nsa.gov> wrote:
>>
>> Fixes: https://github.com/SELinuxProject/selinux/issues/61
>> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
>> ---
>> v2 wraps basedir + filename in parentheses as per Nicolas Iooss' suggestion.
> 
> Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Thanks, applied.

> 
>>
>>   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)
>> --
>> 2.21.0
>>
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 14:20 [PATCH v2] python/sepolicy: call segenxml.py with python3 Stephen Smalley
2019-10-10 19:48 ` Nicolas Iooss
2019-10-15 14:17   ` Stephen Smalley

SELinux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux/0 selinux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux selinux/ https://lore.kernel.org/selinux \
		selinux@vger.kernel.org
	public-inbox-index selinux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git