summaryrefslogtreecommitdiff
path: root/libpam-modules.postinst
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2021-12-06 11:11:31 -0800
committerSteve Langasek <vorlon@debian.org>2021-12-06 11:11:31 -0800
commit17efd306e797a3fe46564896de31583c2c99f338 (patch)
tree27337874beef07ca244676e6a55ad35d709c32c9 /libpam-modules.postinst
Import pam_1.4.0-11.debian.tar.xz
[dgit import tarball pam 1.4.0-11 pam_1.4.0-11.debian.tar.xz]
Diffstat (limited to 'libpam-modules.postinst')
-rw-r--r--libpam-modules.postinst28
1 files changed, 28 insertions, 0 deletions
diff --git a/libpam-modules.postinst b/libpam-modules.postinst
new file mode 100644
index 00000000..ce03090b
--- /dev/null
+++ b/libpam-modules.postinst
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+
+# If the user has removed the config file, respect this sign of dementia
+# -- only create on package install.
+
+if [ -z "$2" ] || dpkg --compare-versions "$2" lt 0.99.7.1-3
+then
+ if ! [ -f /etc/security/opasswd ]; then
+ umask 066
+ touch /etc/security/opasswd
+ umask 022
+ fi
+fi
+
+if dpkg --compare-versions "$2" lt 0.99.9.0-1 && ! [ -f /etc/environment ]
+then
+ touch /etc/environment
+fi
+
+if dpkg --compare-versions "$2" lt-nl 1.1.2-1 \
+ && grep -q 'pam_unix.*\bmin=[0-9]\+' /etc/pam.d/common-password
+then
+ echo "'min=' option to pam_unix is obsolete."
+ echo "replacing with 'minlen=' in /etc/pam.d/common-password."
+ sed -i -e'/pam_unix/ s/\bmin=/minlen=/' /etc/pam.d/common-password
+fi
+
+#DEBHELPER#