summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-12-21 12:34:48 +0000
committerdamien <damien@mandriva.com>2000-12-21 12:34:48 +0000
commitbcf7157e9f5fa5eb3ea2a4925d97ef5d26c9347d (patch)
tree5210759b209769abdaf5411b8d834edfc9cc0455
parent740b4b89fd9f0b4d82a18900f8e24682d5575893 (diff)
downloaddrakx-bcf7157e9f5fa5eb3ea2a4925d97ef5d26c9347d.tar
drakx-bcf7157e9f5fa5eb3ea2a4925d97ef5d26c9347d.tar.gz
drakx-bcf7157e9f5fa5eb3ea2a4925d97ef5d26c9347d.tar.bz2
drakx-bcf7157e9f5fa5eb3ea2a4925d97ef5d26c9347d.tar.xz
drakx-bcf7157e9f5fa5eb3ea2a4925d97ef5d26c9347d.zip
if firewall, admin password obliged
-rw-r--r--perl-install/install_steps_interactive.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index d7a5fb728..f0daf96fa 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -794,6 +794,7 @@ _("Use NIS") => { val => \$nis, type => 'bool', text => _("yellow pages") },
sub addUser {
my ($o, $clicked) = @_;
my $u = $o->{user} ||= {};
+ my $admin = $o->{adminuser} ||= {};
if ($o->{security} < 1) {
add2hash_($u, { name => "mandrake", password => "mandrake", realname => "default", icon => 'automagic' });
$o->{users} ||= [ $u ];
@@ -803,6 +804,20 @@ sub addUser {
my @fields = qw(realname name password password2);
my @shells = map { chomp; $_ } cat_("$o->{prefix}/etc/shells");
+ $o->{meta_class} eq 'firewall' and !$admin->{set} and
+ $o->ask_from_entries_refH([_("Set admin password"), _("Ok"), $o->{security} > 2 || $::corporate ? () : _("No password")],
+ [ _("Set admin password"), "\n" ], [
+_("Password") => { val => \$admin->{password}, hidden => 1 },
+_("Password (again)") => { val => \$admin->{password2}, hidden => 1 }
+ ],
+ complete => sub {
+ $admin->{password} eq $admin->{password2} or $o->ask_warn('', [ _("The passwords do not match"), _("Please try again") ]), return (1,1);
+ length $admin->{password} < 2 * $o->{security}
+ and $o->ask_warn('', _("This password is too simple (must be at least %d characters long)", 2 * $o->{security})), return (1,0);
+ return 0
+ }
+ ) and $admin->{set}=1 or return;
+ install_steps::setAdminPassword($o);
if (($o->{security} >= 1 || $clicked)) {
$u->{icon} = translate($u->{icon});
if ($o->ask_from_entries_refH(
@@ -1109,7 +1124,7 @@ Do you really want to quit now?"), 0);
$o->exit unless $alldone;
- if ($::firewall) {
+ if ($o->{meta_class} eq 'firewall') {
$o->ask_warn('',
_("Congratulations, installation is complete.
Remove the boot media and press return to reboot.