diff options
Diffstat (limited to 'debian/local/pam-auth-update')
-rwxr-xr-x | debian/local/pam-auth-update | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update index 829833b8..3989f9f6 100755 --- a/debian/local/pam-auth-update +++ b/debian/local/pam-auth-update @@ -299,7 +299,7 @@ sub create_from_template $output = $profiles->{$mod}{$uctype . '-Initial'}; $i++; } else { - $output = $profiles->{$mod}{$uctype . '-Final'}; + $output = $profiles->{$mod}{$uctype}; } # bypasses a perl warning about @_, sigh my @tmparr = split("\n+",$output); @@ -322,7 +322,7 @@ sub create_from_template $output = $profiles->{$mod}{$uctype . '-Initial'}; $i++; } else { - $output = $profiles->{$mod}{$uctype . '-Final'}; + $output = $profiles->{$mod}{$uctype}; } for my $line (split("\n",$output)) { $line = merge_one_line($line,$diff, @@ -459,7 +459,7 @@ sub write_profiles $output = $profiles->{$mod}{$uctype . '-Initial'}; $i++; } else { - $output = $profiles->{$mod}{$uctype . '-Final'}; + $output = $profiles->{$mod}{$uctype}; } if ($output) { print OUTPUT "Module: $mod\n"; @@ -611,12 +611,15 @@ sub parse_pam_profile while (<PROFILE>) { if (/^(\S+):\s+(.*)$/) { $fieldname = $1; + # compatibility with the first implementation round; + # "Auth-Final" is now just called "Auth" + $fieldname =~ s/-Final$//; if ($fieldname eq 'Conflicts') { foreach my $elem (split(/, /, $2)) { $profile{'Conflicts'}->{$elem} = 1; } } else { - $profile{$1} = $2; + $profile{$fieldname} = $2; } } else { chomp; |