FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 12-11-2008, 07:16 PM
Chris Lumens
 
Default 474937 - don't duplicate --dport 22

We were writing --dport 22 to /etc/sysconfig/iptables twice beacuse ssh
was getting included both in the kickstart file and implicitly in
firewall.py. Check for that duplication.

While I'm at it, also actually handle --service= in the kickstart file
in firewall.py.

- Chris


diff --git a/firewall.py b/firewall.py
index f3e689d..ef543e6 100644
--- a/firewall.py
+++ b/firewall.py
@@ -35,7 +35,7 @@ class Firewall:
self.enabled = 1
self.trustdevs = []
self.portlist = []
- self.servicelist = ["ssh"]
+ self.servicelist = []

def writeKS(self, f):
f.write("firewall")
@@ -54,7 +54,10 @@ class Firewall:
if not self.enabled:
args.append("--disabled")
return args
-
+
+ if not "ssh" in self.servicelist and not "22:tcp" in self.portlist:
+ args += ["--service=ssh"]
+
for dev in self.trustdevs:
args = args + [ "--trust=%s" %(dev,) ]

diff --git a/kickstart.py b/kickstart.py
index 4d70d51..961da30 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -247,6 +247,9 @@ class Firewall(commands.firewall.F10_Firewall):
for port in self.ports:
self.handler.id.firewall.portlist.append (port)

+ for svc in self.services:
+ self.handler.id.firewall.servicelist.append (svc)
+
class Firstboot(commands.firstboot.FC3_Firstboot):
def parse(self, args):
commands.firstboot.FC3_Firstboot.parse(self, args)

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org