diff options
author | Steve Langasek <vorlon@debian.org> | 2008-09-15 23:42:52 -0700 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 17:28:27 -0800 |
commit | 742de85ea6bf7a1ef70b8223697976165bed267a (patch) | |
tree | cdbb4061ff6d5c7114d2d493a93ad453554017c9 /debian/local | |
parent | b5fc8e3cd5277c8f7cac99bf006d14d7906eb01c (diff) |
synchronize the state-saving format with the code actually used for comparisons
Diffstat (limited to 'debian/local')
-rwxr-xr-x | debian/local/pam-auth-update | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update index 3989f9f6..c2fd0dda 100755 --- a/debian/local/pam-auth-update +++ b/debian/local/pam-auth-update @@ -452,8 +452,30 @@ sub write_profiles } my $i = 0; my $uctype = ucfirst($type); - for my $mod (@enabled) { + for my $mod (@{$enabled}) { my $output; + next if (!$profiles->{$mod}{$uctype . '-Type'}); + next if ($profiles->{$mod}{$uctype . '-Type'} eq 'Additional'); + + if ($i == 0 && $profiles->{$mod}{$uctype . '-Initial'}) + { + $output = $profiles->{$mod}{$uctype . '-Initial'}; + $i++; + } else { + $output = $profiles->{$mod}{$uctype}; + } + if ($output) { + print OUTPUT "Module: $mod\n"; + print OUTPUT $output . "\n"; + } + } + + $i = 0; + for my $mod (@{$enabled}) { + my $output; + next if (!$profiles->{$mod}{$uctype . '-Type'}); + next if ($profiles->{$mod}{$uctype . '-Type'} eq 'Primary'); + if ($i == 0 && $profiles->{$mod}{$uctype . '-Initial'}) { $output = $profiles->{$mod}{$uctype . '-Initial'}; |