summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/authentication.pm6
-rw-r--r--perl-install/install_steps_interactive.pm2
-rwxr-xr-xperl-install/standalone/drakauth3
3 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index 9586ee30c..2a647ce37 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -3,8 +3,10 @@ package authentication; # $Id$
use common;
use any;
-sub kinds() {
- ('local', 'LDAP', 'NIS', 'winbind', 'AD', 'SMBKRB');
+sub kinds {
+ my ($meta_class) = @_;
+ my $allow_AD = $meta_class =~ /corporate/;
+ ('local', 'LDAP', 'NIS', 'winbind', if_($allow_AD, 'AD', 'SMBKRB'));
}
sub kind2name {
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index cefc38205..8e8b7a16d 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -1212,7 +1212,7 @@ sub setRootPassword {
} } }, [
{ label => N("Password"), val => \$sup->{password}, hidden => 1 },
{ label => N("Password (again)"), val => \$sup->{password2}, hidden => 1 },
-{ label => N("Authentication"), val => \$authentication_kind, type => 'list', list => [ authentication::kinds() ], format => \&authentication::kind2name, advanced => 1 },
+{ label => N("Authentication"), val => \$authentication_kind, type => 'list', list => [ authentication::kinds($o->{meta_class}) ], format => \&authentication::kind2name, advanced => 1 },
]) or delete $sup->{password};
authentication::ask_parameters($o, $o->{netc}, $o->{authentication}, $authentication_kind) or goto &setRootPassword;
diff --git a/perl-install/standalone/drakauth b/perl-install/standalone/drakauth
index 8fdb40896..1d89e08d7 100755
--- a/perl-install/standalone/drakauth
+++ b/perl-install/standalone/drakauth
@@ -19,11 +19,12 @@ my $in = 'interactive'->vnew('su');
my $authentication = {}; # TODO
my $kind = authentication::to_kind($authentication);
+my $meta_class = { getVarsFromSh("/etc/sysconfig/system") }->{META_CLASS};
main:
$in->ask_from(N("Authentication"), authentication::kind2description(),
[
- { label => N("Authentication"), val => \$kind, type => 'list' , list => [ authentication::kinds() ], format => \&authentication::kind2name },
+ { label => N("Authentication"), val => \$kind, type => 'list' , list => [ authentication::kinds($meta_class) ], format => \&authentication::kind2name },
]) or $in->exit;
authentication::ask_parameters($in, $netc, $authentication, $kind) or goto main;