aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/local/pam-auth-update4
-rw-r--r--debian/tests/pam-auth-update4
2 files changed, 7 insertions, 1 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update
index b3de86e7..ac00b1c9 100644
--- a/debian/local/pam-auth-update
+++ b/debian/local/pam-auth-update
@@ -162,7 +162,9 @@ push(@enabled,
# Disable anything explicitly disabled
@enabled = grep {!$to_disable{$_} } @enabled;
# And we've seen anything we disable
-delete @seen{ keys %to_disable};
+foreach my $i (keys %to_disable) {
+ $seen{$i} = 1;
+}
# an empty module set is an error, so in that case grab all the defaults
if (!@enabled) {
diff --git a/debian/tests/pam-auth-update b/debian/tests/pam-auth-update
index e4973bff..d2649f36 100644
--- a/debian/tests/pam-auth-update
+++ b/debian/tests/pam-auth-update
@@ -28,7 +28,11 @@ grep -i rounds /etc/pam.d/common-password &&fail rounds parameter already specif
sed -i -e 's/obscure yescrypt/obscure yescrypt rounds=3/' /etc/pam.d/common-password
grep rounds /etc/pam.d/common-password ||fail sed did not update common password
+( echo get libpam-runtime/profiles |debconf-communicate |grep mkhomedir) || fail mkhomedir not in enabled profiles
+
# Confirm removing mkhomedir preserves rounds parameter
pam-auth-update --disable mkhomedir ||fail pam-auth-update disable failed
+( echo get libpam-runtime/profiles |debconf-communicate |grep mkhomedir) && fail mkhomedir still in profiles
+grep mkhomedir /var/lib/pam/seen || fail mkhomedir removed from seen after disable
grep mkhomedir /etc/pam.d/common-session &&fail pam_mkhomedir not removed
grep rounds /etc/pam.d/common-password || fail rounds parameter not preserved