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 | |
parent | eb000ca3993b37dee7192ed1db993ef10bb45b12 (diff) | |
download | drakx-9f332be09e4b313e74a135a847b82f7a1ccfc64a.tar drakx-9f332be09e4b313e74a135a847b82f7a1ccfc64a.tar.gz drakx-9f332be09e4b313e74a135a847b82f7a1ccfc64a.tar.bz2 drakx-9f332be09e4b313e74a135a847b82f7a1ccfc64a.tar.xz drakx-9f332be09e4b313e74a135a847b82f7a1ccfc64a.zip |
- configure a firewall by default in secure level >= 3
- allow auto_install parameter {firewall_ports}
-rw-r--r-- | perl-install/install_steps.pm | 15 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 4 |
2 files changed, 18 insertions, 1 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}); + } } #------------------------------------------------------------------------------ diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 9b5fb997e..a23c6e060 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -1101,7 +1101,9 @@ sub summary { }, clicked => sub { require network::drakfirewall; - network::drakfirewall::main($o, $o->{security} <= 3); + if (my @rc = network::drakfirewall::main($o, $o->{security} <= 3)) { + $o->{firewall_ports} = !$rc[0] && $rc[1]; + } }, } if detect_devices::getNet(); |