summaryrefslogtreecommitdiffstats
path: root/debian/systemd-homed.postinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:44 +0000
commit5c4ff5cee2b18c18b315c8887ab60e5b7940ae0b (patch)
tree52c412d94cd9319af800bb1ddda8d906136fbd0a /debian/systemd-homed.postinst
parentMerging upstream version 256. (diff)
downloadsystemd-5c4ff5cee2b18c18b315c8887ab60e5b7940ae0b.tar.xz
systemd-5c4ff5cee2b18c18b315c8887ab60e5b7940ae0b.zip
Adding debian version 256-1.debian/256-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/systemd-homed.postinst')
-rw-r--r--debian/systemd-homed.postinst21
1 files changed, 20 insertions, 1 deletions
diff --git a/debian/systemd-homed.postinst b/debian/systemd-homed.postinst
index 7e37590..0be578f 100644
--- a/debian/systemd-homed.postinst
+++ b/debian/systemd-homed.postinst
@@ -2,6 +2,25 @@
set -e
-pam-auth-update --package
+# pam-auth-update makes wrong assumptions and doesn't allow no-op modules, so
+# we need to remove 'use_authtok try_first_pass' after it runs
+_fixup_common_password() {
+ sed -i "s/pam_unix.so obscure use_authtok try_first_pass/pam_unix.so obscure/g" /etc/pam.d/common-password || true
+}
+
+if [ "$1" = "triggered" ]; then
+ shift
+ for trigger in $@; do
+ case $trigger in
+ /usr/share/pam-configs)
+ _fixup_common_password
+ ;;
+ esac
+ done
+ exit 0
+fi
+
+pam-auth-update --package --enable systemd-homed
+_fixup_common_password
#DEBHELPER#