mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-11 16:44:59 +00:00
python/semanage: Fix export of ibendport entries
Replace nonexistent switch "-x" by "-z" (entry name). Fix invalid index (the dictionary key is a 2-tuple). Add MLS/MCS range (present in all entries). Fixes: #semanage ibendport -E File "/usr/sbin/semanage", line 1049, in <module> do_parser() File "/usr/sbin/semanage", line 1028, in do_parser args.func(args) File "/usr/sbin/semanage", line 605, in handleIbendport for i in OBJECT.customized(): File "/usr/lib64/python2.7/site-packages/seobject/__init__.py", line 1806, in customized l.append("-a -t %s -x %s %s" % (ddict[k][0], k[2], k[0])) IndexError: tuple index out of range Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
This commit is contained in:
parent
ebbf42d408
commit
2927532b1c
@ -1788,7 +1788,7 @@ class ibendportRecords(semanageRecords):
|
|||||||
keys = ddict.keys()
|
keys = ddict.keys()
|
||||||
keys.sort()
|
keys.sort()
|
||||||
for k in keys:
|
for k in keys:
|
||||||
l.append("-a -t %s -x %s %s" % (ddict[k][0], k[2], k[0]))
|
l.append("-a -t %s -r %s -z %s %s" % (ddict[k][0], ddict[k][1], k[1], k[0]))
|
||||||
return l
|
return l
|
||||||
|
|
||||||
def list(self, heading=1, locallist=0):
|
def list(self, heading=1, locallist=0):
|
||||||
|
Loading…
Reference in New Issue
Block a user