diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-03-22 09:22:37 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-03-22 09:22:37 +0000 |
commit | 84d17494d696db27d51fcad95e238f58bc866646 (patch) | |
tree | d148c1cad1f9b3cf11140df4ac6ac9f898af31ca | |
parent | cebcb11f40d5e1903690bd337148d4a68b8151e5 (diff) | |
download | drakx-backup-do-not-use-84d17494d696db27d51fcad95e238f58bc866646.tar drakx-backup-do-not-use-84d17494d696db27d51fcad95e238f58bc866646.tar.gz drakx-backup-do-not-use-84d17494d696db27d51fcad95e238f58bc866646.tar.bz2 drakx-backup-do-not-use-84d17494d696db27d51fcad95e238f58bc866646.tar.xz drakx-backup-do-not-use-84d17494d696db27d51fcad95e238f58bc866646.zip |
SmartCard authentication needs a (bloody) proprietary package,
only propose it when the package is available
-rw-r--r-- | perl-install/authentication.pm | 14 | ||||
-rwxr-xr-x | perl-install/standalone/drakauth | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index ad5d38063..f82a05cb8 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -5,9 +5,17 @@ use any; sub kinds { my $no_para = @_ == 0; - my ($meta_class) = @_; + my ($do_pkgs, $meta_class) = @_; + my $allow_SmartCard = $no_para || $do_pkgs->is_available('castella-pam'); my $allow_AD = $no_para || $meta_class =~ /corporate/; - ('local', 'LDAP', 'NIS', 'SmartCard', 'winbind', if_($allow_AD, 'AD', 'SMBKRB')); + ( + 'local', + 'LDAP', + 'NIS', + if_($allow_SmartCard, 'SmartCard'), + 'winbind', + if_($allow_AD, 'AD', 'SMBKRB'), + ); } sub kind2name { @@ -180,7 +188,7 @@ sub ask_root_password_and_authentication { } } }, [ { label => N("Password"), val => \$superuser->{password}, hidden => 1 }, { label => N("Password (again)"), val => \$superuser->{password2}, hidden => 1 }, -{ label => N("Authentication"), val => \$kind, type => 'list', list => [ authentication::kinds($meta_class) ], format => \&authentication::kind2name, advanced => 1 }, +{ label => N("Authentication"), val => \$kind, type => 'list', list => [ authentication::kinds($in->do_pkgs, $meta_class) ], format => \&authentication::kind2name, advanced => 1 }, ]) or delete $superuser->{password}; ask_parameters($in, $netc, $authentication, $kind) or goto &ask_root_password_and_authentication; diff --git a/perl-install/standalone/drakauth b/perl-install/standalone/drakauth index fe5bae4bf..276ecd287 100755 --- a/perl-install/standalone/drakauth +++ b/perl-install/standalone/drakauth @@ -22,7 +22,7 @@ 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($meta_class) ], format => \&authentication::kind2name }, + { label => N("Authentication"), val => \$kind, type => 'list' , list => [ authentication::kinds($in->do_pkgs, $meta_class) ], format => \&authentication::kind2name }, ]) or $in->exit; authentication::ask_parameters($in, $netc, $authentication, $kind) or goto main; |