summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-10 15:03:22 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-10 15:03:22 +0000
commite862a15cbf4c2992fca69943c4a7598f8d06df8a (patch)
treefc7c638e79b4c938da5bbc40cffad7df9ab32c48 /perl-install
parente099a6036b21f56eb0f03b797d450c9f7557251c (diff)
downloaddrakx-backup-do-not-use-e862a15cbf4c2992fca69943c4a7598f8d06df8a.tar
drakx-backup-do-not-use-e862a15cbf4c2992fca69943c4a7598f8d06df8a.tar.gz
drakx-backup-do-not-use-e862a15cbf4c2992fca69943c4a7598f8d06df8a.tar.bz2
drakx-backup-do-not-use-e862a15cbf4c2992fca69943c4a7598f8d06df8a.tar.xz
drakx-backup-do-not-use-e862a15cbf4c2992fca69943c4a7598f8d06df8a.zip
- correctly restore pam.d/system-auth when setting "local" authentication
- no use_first_pass on "auth sufficient pam_unix.so" line for pam_castella
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/authentication.pm20
1 files changed, 14 insertions, 6 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index 74a6cd315..a7fcfba00 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -142,7 +142,9 @@ sub set {
log::l("authentication::set $kind");
- if ($kind eq 'SmartCard') {
+ if ($kind eq 'local') {
+ set_pam_authentication();
+ } elsif ($kind eq 'SmartCard') {
$in->do_pkgs->install('castella-pam');
set_pam_authentication('castella');
} elsif ($kind eq 'LDAP') {
@@ -336,14 +338,20 @@ sub set_pam_authentication {
#- first removing previous config
$_ = '';
}
- if ($module eq 'pam_unix' && $special{$type} && @{$special{$type}}) {
+ if ($module eq 'pam_unix' && $special{$type}) {
my @para_for_last =
- $type eq 'auth' ? qw(likeauth nullok use_first_pass) :
- $type eq 'account' ? qw(use_first_pass) : @{[]};
+ $type eq 'auth' ? qw(likeauth nullok use_first_pass) :
+ $type eq 'account' ? qw(use_first_pass) : @{[]};
@para = difference2(\@para, \@para_for_last);
- my ($before, $after) = partition { member($_, 'krb5', 'castella') } @{$special{$type}};
- my @l = ((map { [ "pam_$_" ] } @$before),
+ my ($before_noask, $ask) = partition { $_ eq 'castella' } @{$special{$type}};
+ my ($before, $after) = partition { $_ eq 'krb5' } @$ask;
+
+ if (!@$ask) {
+ @para_for_last = grep { $_ ne 'use_first_pass' } @para_for_last;
+ }
+
+ my @l = ((map { [ "pam_$_" ] } @$before_noask, @$before),
[ 'pam_unix', @para ],
(map { [ "pam_$_" ] } @$after),
);