-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Description
The semanage tool crashes on systems without installed policies:
# semanage
Traceback (most recent call last):
File "/usr/sbin/semanage", line 28, in <module>
import seobject
File "/usr/lib/python3.4/site-packages/seobject.py", line 1039, in <module>
class portRecords(semanageRecords):
File "/usr/lib/python3.4/site-packages/seobject.py", line 1041, in portRecords
valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "port_type"))[0]["types"])
File "/usr/lib/python3.4/site-packages/sepolicy/__init__.py", line 196, in <genexpr>
return ({
File "/usr/lib/python3.4/site-packages/setools/typeattrquery.py", line 65, in results
for attr in self.policy.typeattributes():
AttributeError: 'NoneType' object has no attribute 'typeattributes'
This is caused by sepol (the python module) setting the global _pol variable to None
– something setools.TypeAttributeQuery can't deal with.
platform details:
python3-modules used with python-3.4.3
distribution: mer
libselinux/ libsepol/ libsemanage/ policycoreutils: v2.7
python3-setools: 4.1.1
disclaimer: policycoreutils and setools are customly packaged, this is a possible (but unlikely) error source
Metadata
Metadata
Assignees
Labels
No labels