aboutsummaryrefslogtreecommitdiff
path: root/debian/libpam-runtime.prerm
diff options
context:
space:
mode:
authorSam Hartman <hartmans@debian.org>2021-02-03 12:35:30 -0500
committerSteve Langasek <steve.langasek@canonical.com>2021-09-15 17:52:36 -0700
commita4598f6953343d53c5c81cc48118d5c15e9db386 (patch)
treedd8da1a0e69e41eaf29257e1a5c1d0f3c1de3e52 /debian/libpam-runtime.prerm
parenta988df03c456c6a300a18ac5529efff4e1a1473b (diff)
downloadpam-a4598f6953343d53c5c81cc48118d5c15e9db386.tar.gz
pam-a4598f6953343d53c5c81cc48118d5c15e9db386.tar.bz2
pam-a4598f6953343d53c5c81cc48118d5c15e9db386.zip
debian/libpam-runtime.prerm: Update block about removal
Diffstat (limited to 'debian/libpam-runtime.prerm')
-rw-r--r--debian/libpam-runtime.prerm21
1 files changed, 15 insertions, 6 deletions
diff --git a/debian/libpam-runtime.prerm b/debian/libpam-runtime.prerm
index 21cd2304..2690cc09 100644
--- a/debian/libpam-runtime.prerm
+++ b/debian/libpam-runtime.prerm
@@ -1,11 +1,20 @@
#!/bin/sh
set -e
-# If libpam-runtime is being removed, which requires
-# --force-remove-essential, don't generate an infinite loop with lack
-# of profiles.
-if [ "$1" = remove ] && [ "$2" != "" ]; then
- pam-auth-update --package --remove unix
-fi
+# Packages including pam configurations need to include a block like
+# the following to arrange for removal of the PAM profile prior to
+# package removale. Libpam-runtime is special because it includes the
+# machinery for managing the profiles and because there is a check to
+# make sure at least one profile is enabled. Libpam-runtime can only
+# be removed in a situation where dpkg checks are being overriden; in
+# that case the resulting PAM config is likely to be broken anyway.
+# But we prefer to permit the removal if enough dpkg force options are
+# given than to create an infinite loop. So, this block is commented
+# out, left here as an example for other packages.
+
+
+# if [ "$1" = remove ] ; then
+# pam-auth-update --package --remove unix
+# fi
#DEBHELPER#