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@xxxxxxxxxx> --- python/semanage/seobject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py index 228c8ae..380256b 100644 --- a/python/semanage/seobject.py +++ b/python/semanage/seobject.py @@ -1788,7 +1788,7 @@ class ibendportRecords(semanageRecords): keys = ddict.keys() keys.sort() 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 def list(self, heading=1, locallist=0): -- 2.9.4