diff options
author | Johannes Schauer Marin Rodrigues <josch@debian.org> | 2022-10-28 11:58:42 +0200 |
---|---|---|
committer | Sam Hartman <hartmans@debian.org> | 2023-01-03 13:17:09 -0700 |
commit | 18ec2805e53ecc597e2f09f77d71eee8d71a9dfc (patch) | |
tree | e1353f455c9b9884e5b4cdaac86c994724f40a9a /debian/local | |
parent | 7bbbd03216ae8ef6df06098addedfd3a46ec19e2 (diff) | |
download | pam-18ec2805e53ecc597e2f09f77d71eee8d71a9dfc.tar.gz pam-18ec2805e53ecc597e2f09f77d71eee8d71a9dfc.tar.bz2 pam-18ec2805e53ecc597e2f09f77d71eee8d71a9dfc.zip |
pam-auth-update: read config after processing cli arguments to not ignore --root for $inputdir
Diffstat (limited to 'debian/local')
-rw-r--r-- | debian/local/pam-auth-update | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update index 6c374fc1..385855cf 100644 --- a/debian/local/pam-auth-update +++ b/debian/local/pam-auth-update @@ -63,16 +63,6 @@ my %md5sums = ( ); my @invalid_modules = ('pam_tally'); -opendir(DIR, $inputdir) || die "could not open config directory: $!"; -while (my $profile = readdir(DIR)) { - next if ($profile eq '.' || $profile eq '..' || $profile =~ m/~$/ || $profile =~ m/^#.+#$/); - %{$profiles{$profile}} = parse_pam_profile($inputdir . '/' . $profile); - if (defined $profiles{$profile}{'disabled'} and $profiles{$profile}{'disabled'}) { - delete $profiles{$profile}; - } -} -closedir DIR; - # use a '--force' arg to specify that /etc/pam.d should be overwritten; # used only on upgrades where the postinst has already determined that the # checksums match. Module packages other than libpam-runtime itself must @@ -110,6 +100,16 @@ while ($#ARGV >= 0) { } } +opendir(DIR, $inputdir) || die "could not open config directory: $!"; +while (my $profile = readdir(DIR)) { + next if ($profile eq '.' || $profile eq '..' || $profile =~ m/~$/ || $profile =~ m/^#.+#$/); + %{$profiles{$profile}} = parse_pam_profile($inputdir . '/' . $profile); + if (defined $profiles{$profile}{'disabled'} and $profiles{$profile}{'disabled'}) { + delete $profiles{$profile}; + } +} +closedir DIR; + $priority = 'medium' if ($package); x_loadtemplatefile('/var/lib/dpkg/info/libpam-runtime.templates','libpam-runtime'); |