summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2008-10-15 15:03:20 -0700
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 17:28:28 -0800
commit7672b834f54fe03b7a1288ecf13967a4179fc10b (patch)
treee2744b8d6def348357dfbb2b87e642c3b6b8a2ed /debian
parentabc21aa0bb81bb320cec8d998e6b3cfa3060a79a (diff)
Use -Initial only for the first profile, even when there's no explicit -Initial
config for that first profile
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/local/pam-auth-update6
1 files changed, 2 insertions, 4 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update
index 4c09c657..b8cff47b 100755
--- a/debian/local/pam-auth-update
+++ b/debian/local/pam-auth-update
@@ -295,11 +295,10 @@ sub create_from_template
my $output;
next if (!$profiles->{$mod}{$uctype . '-Type'});
next if $profiles->{$mod}{$uctype . '-Type'} ne $val;
- if ($i == 0
+ if ($i++ == 0
&& $profiles->{$mod}{$uctype . '-Initial'})
{
$output = $profiles->{$mod}{$uctype . '-Initial'};
- $i++;
} else {
$output = $profiles->{$mod}{$uctype};
}
@@ -318,11 +317,10 @@ sub create_from_template
my @output;
next if (!$profiles->{$mod}{$uctype . '-Type'});
next if $profiles->{$mod}{$uctype . '-Type'} ne $val;
- if ($i == 0
+ if ($i++ == 0
&& $profiles->{$mod}{$uctype . '-Initial'})
{
$output = $profiles->{$mod}{$uctype . '-Initial'};
- $i++;
} else {
$output = $profiles->{$mod}{$uctype};
}