Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 447360

Summary: semanage permissive fails with 'module' object has no attribute 'getstatusoutput'
Product: Gentoo Linux Reporter: Sven Vermeulen (RETIRED) <swift>
Component: SELinuxAssignee: Sven Vermeulen (RETIRED) <swift>
Status: VERIFIED FIXED    
Severity: normal CC: selinux
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: selinux-utils
Package list:
Runtime testing required: ---

Description Sven Vermeulen (RETIRED) gentoo-dev 2012-12-15 14:08:12 UTC
# semanage permissive -a portage_t
Traceback (most recent call last):
  File "/usr/sbin/semanage-2.7", line 569, in <module>
    process_args(sys.argv[1:])
  File "/usr/sbin/semanage-2.7", line 442, in process_args
    OBJECT.add(target)
  File "/usr/lib64/python2.7/site-packages/seobject.py", line 431, in add
    mc.create_module_package(filename, 1)
  File "/usr/lib64/python2.7/site-packages/sepolgen/module.py", line 172, in create_module_package
    self.refpol_build(sourcename)
  File "/usr/lib64/python2.7/site-packages/sepolgen/module.py", line 182, in refpol_build
    rc = self.run(command)
  File "/usr/lib64/python2.7/site-packages/sepolgen/module.py", line 133, in run
    rc, output = subprocess.getstatusoutput(command)
AttributeError: 'module' object has no attribute 'getstatusoutput'


Reproducible: Always
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2012-12-15 15:10:14 UTC
Python-3 conversion switched from commands to subprocess module, but the subprocess module doesn't provide getstatusoutput().

Going to update that method to use subprocess.Popen() as that works with both 2.7 and 3.x
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2012-12-17 19:02:10 UTC
sys-libs/libsepol-2.1.8-r1 now in hardened-dev overlay
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2012-12-30 15:28:42 UTC
Stablized