diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-03-24 14:02:03 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-03-24 14:02:03 +0000 |
commit | 9f332be09e4b313e74a135a847b82f7a1ccfc64a (patch) | |
tree | 8418b2fab777ada9d19a33b269fa11af8d9e6060 /perl-install/install_steps.pm | |
parent | eb000ca3993b37dee7192ed1db993ef10bb45b12 (diff) | |
download | drakx-backup-do-not-use-9f332be09e4b313e74a135a847b82f7a1ccfc64a.tar drakx-backup-do-not-use-9f332be09e4b313e74a135a847b82f7a1ccfc64a.tar.gz drakx-backup-do-not-use-9f332be09e4b313e74a135a847b82f7a1ccfc64a.tar.bz2 drakx-backup-do-not-use-9f332be09e4b313e74a135a847b82f7a1ccfc64a.tar.xz drakx-backup-do-not-use-9f332be09e4b313e74a135a847b82f7a1ccfc64a.zip |
- configure a firewall by default in secure level >= 3
- allow auto_install parameter {firewall_ports}
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r-- | perl-install/install_steps.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 8ccaa2ecd..7705794ee 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -658,6 +658,21 @@ sub configureNetwork { $o->{netcnx}{type} = 'lan'; $o->{netcnx}{$_} = $o->{netc}{$_} foreach qw(NET_DEVICE NET_INTERFACE); } + + configure_firewall($o) if !$o->{isUpgrade}; +} + +sub configure_firewall { + my ($o) = @_; + + if (!exists $o->{firewall_ports} && $o->{security} >= 3) { + require network::drakfirewall; + $o->{firewall_ports} = network::drakfirewall::default_ports($o->do_pkgs); + } + if ($o->{firewall_ports}) { + require network::drakfirewall; + network::drakfirewall::set_ports($o->do_pkgs, 0, $o->{firewall_ports}); + } } #------------------------------------------------------------------------------ |