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 > Redhat > EPEL Development

 
 
LinkBack Thread Tools
 
Old 03-08-2011, 05:53 PM
David Cantrell
 
Default Allow blocking the ssh port through kickstart (#485086).

Ack.

Chris Lumens <clumens@redhat.com> wrote:

> ---
> installclass.py | 7 +++++--
> kickstart.py | 2 +-
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/installclass.py b/installclass.py
> index 9a34363..36665cf 100644
> --- a/installclass.py
> +++ b/installclass.py
> @@ -305,13 +305,16 @@ class BaseInstallClass:
> def setSELinux(self, id, sel):
> id.security.setSELinux(sel)
>
> - def setFirewall(self, id, enable = 1, trusts = [], ports = []):
> + def setFirewall(self, id, enable = 1, trusts = [], ports = [], disableSsh = False):
> id.firewall.enabled = enable
> id.firewall.trustdevs = trusts
>
> for port in ports:
> id.firewall.portlist.append (port)
> -
> +
> + if disableSsh:
> + id.firewall.portlist.remove("22:tcp")
> +
> def setMiscXSettings(self, id, depth = None, resolution = None,
> desktop = None, runlevel = None):
>
> diff --git a/kickstart.py b/kickstart.py
> index 46c6c1f..5f40e61 100644
> --- a/kickstart.py
> +++ b/kickstart.py
> @@ -197,7 +197,7 @@ class AnacondaKSHandlers(KickstartHandlers):
> KickstartHandlers.doFirewall(self, args)
> dict = self.ksdata.firewall
> self.id.instClass.setFirewall(self.id, dict["enabled"], dict["trusts"],
> - dict["ports"])
> + dict["ports"], disableSsh=dict["disableSsh"])
>
> def doFirstboot(self, args):
> KickstartHandlers.doFirstboot(self, args)
> --
> 1.7.4.1
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

--
David Cantrell <dcantrell@redhat.com>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Honolulu, HI | UTC-10

_______________________________________________
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 11:22 PM.

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