summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-23 20:23:09 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-23 20:23:09 +0000
commitd6bf4b3c556462476d76242aeb5394f6fba34162 (patch)
treee87b87ef7ad5fa16f2ad7b2e082c7ab43608c1cd
parentb62ae0c4ae54cefde876543ca154d20ef0f5ee69 (diff)
downloaddrakx-backup-do-not-use-d6bf4b3c556462476d76242aeb5394f6fba34162.tar
drakx-backup-do-not-use-d6bf4b3c556462476d76242aeb5394f6fba34162.tar.gz
drakx-backup-do-not-use-d6bf4b3c556462476d76242aeb5394f6fba34162.tar.bz2
drakx-backup-do-not-use-d6bf4b3c556462476d76242aeb5394f6fba34162.tar.xz
drakx-backup-do-not-use-d6bf4b3c556462476d76242aeb5394f6fba34162.zip
(set_pam_authentication) perl_checker cleanups
-rw-r--r--perl-install/authentication.pm11
-rwxr-xr-xperl-install/standalone/finish-install2
2 files changed, 6 insertions, 7 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index a76a62d0b..a3e8ca3ca 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -530,8 +530,7 @@ sub pam_sufficient_line {
sub set_pam_authentication {
- #my (@authentication_kinds) = @_;
- my ($authentication_kinds, $ccreds) = @_;
+ my ($authentication_kinds, $o_ccreds) = @_;
my %special = (
#auth => [ difference2(\@authentication_kinds,, [ 'mount' ]) ],
@@ -586,15 +585,15 @@ sub set_pam_authentication {
);
push @{$l[-1]}, @para_for_last;
#$_ = join('', map { pam_format_line($type, 'sufficient', @$_) } @l);
- ### $_ = join('', map { pam_format_line($type, sufficient($ccreds, $_->[0], $type), @$_) } @l);
- $_ = join('', map { pam_sufficient_line($ccreds, $type, @$_) } @l);
+ ### $_ = join('', map { pam_format_line($type, sufficient($o_ccreds, $_->[0], $type), @$_) } @l);
+ $_ = join('', map { pam_sufficient_line($o_ccreds, $type, @$_) } @l);
if ($control eq 'required') {
#- ensure a pam_deny line is there. it will be added below
($module, @para) = ('pam_deny');
}
- if ($type eq 'auth' && $ccreds) {
+ if ($type eq 'auth' && $o_ccreds) {
$_ .= pam_format_line('auth', '[default=done]', 'pam_ccreds', 'action=validate use_first_pass');
$_ .= pam_format_line('auth', '[default=done]', 'pam_ccreds', 'action=store');
$_ .= pam_format_line('auth', '[default=bad]', 'pam_ccreds', 'action=update');
@@ -604,7 +603,7 @@ sub set_pam_authentication {
if (member($module, 'pam_deny', 'pam_permit')) {
$_ .= pam_format_line($type, $control,
- $type eq 'account' && $ccreds ? 'pam_permit' : 'pam_deny');
+ $type eq 'account' && $o_ccreds ? 'pam_permit' : 'pam_deny');
}
if (my $s = delete $before_first{$type}) {
$_ = $s . $_;
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index f0980869d..b8630525a 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -214,7 +214,7 @@ sub encrypt_home {
s/^volume $user->{name}.*//;
$_ .= "volume $user->{name} crypt - $device $home - - -\n" if eof;
} $::prefix . '/etc/security/pam_mount.conf';
- # FIXME: missing parameter
+
authentication::set_pam_authentication('mount');
run_program::raw({ root => $::prefix, sensitive_arguments => 1 },