[selinux-policy] Fix genman.py to correct PORT part
Miroslav Grepl
mgrepl at fedoraproject.org
Mon Jul 23 15:14:17 UTC 2012
commit 1c38921365ff0b24da7c302133cd12d91e27de17
Author: Miroslav Grepl <mgrepl at redhat.com>
Date: Mon Jul 23 17:13:29 2012 +0200
Fix genman.py to correct PORT part
genman.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/genman.py b/genman.py
index e7c7572..17232fa 100755
--- a/genman.py
+++ b/genman.py
@@ -302,6 +302,7 @@ SELinux %(domainname)s policy is very flexible allowing users to setup their %(d
The following port types are defined for %(domainname)s:""" % {'domainname':self.domainname})
for p in self.ports:
+ print p
self.fd.write("""
.EX
@@ -311,8 +312,9 @@ The following port types are defined for %(domainname)s:""" % {'domainname':self
.EE
""" % p)
once = True
- for p in ( "tcp", "udp" ):
- if (f,p) in portrecs:
+ for prot in ( "tcp", "udp" ):
+ if (p,prot) in portrecs:
+ print (p,prot)
if once:
self.fd.write("""
@@ -320,7 +322,7 @@ Default Defined Ports:""")
once = False
self.fd.write(r"""
%s %s
-.EE""" % (p, ",".join(portrecs[(f,p)])))
+.EE""" % (prot, ",".join(portrecs[(p,prot)])))
def file_context(self):
self.fd.write(r"""
More information about the scm-commits
mailing list