summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/local/pam-auth-update24
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'};