summaryrefslogtreecommitdiffstats
path: root/firewall.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2008-09-06 01:42:50 -1000
committerDavid Cantrell <dcantrell@redhat.com>2008-09-06 01:42:50 -1000
commit879fd8d494345887c14ae6ec62a5daf5482db2ad (patch)
tree79fe414791728e1a8f1a8933ef0b320664800c3d /firewall.py
parent1d3e456924a8b79a85b0fb8d1621624bd3e68c55 (diff)
downloadanaconda-879fd8d494345887c14ae6ec62a5daf5482db2ad.tar.gz
anaconda-879fd8d494345887c14ae6ec62a5daf5482db2ad.tar.xz
anaconda-879fd8d494345887c14ae6ec62a5daf5482db2ad.zip
Use --service=NAME in firewall.py when calling lokkit
Suggested by Thomas Woerner at FUDCon Brno 2008. We should be using the --service argument when calling lokkit rather than the portlist.
Diffstat (limited to 'firewall.py')
-rw-r--r--firewall.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/firewall.py b/firewall.py
index 89ec4a21c..f3e689d95 100644
--- a/firewall.py
+++ b/firewall.py
@@ -34,7 +34,8 @@ class Firewall:
def __init__ (self):
self.enabled = 1
self.trustdevs = []
- self.portlist = ["22:tcp"]
+ self.portlist = []
+ self.servicelist = ["ssh"]
def writeKS(self, f):
f.write("firewall")
@@ -50,9 +51,7 @@ class Firewall:
def getArgList(self):
args = []
- if self.enabled:
- args.append("--enabled")
- else:
+ if not self.enabled:
args.append("--disabled")
return args
@@ -61,7 +60,10 @@ class Firewall:
for port in self.portlist:
args = args + [ "--port=%s" %(port,) ]
-
+
+ for service in self.servicelist:
+ args = args + [ "--service=%s" % (service,) ]
+
return args
def write (self, instPath):