summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2010-08-31 23:08:28 -0700
committerSteve Langasek <vorlon@debian.org>2019-01-08 21:48:26 -0800
commit51af808526e0273d607d3cdf061e14ccaa0d96de (patch)
treebf7f8513af2e7cbae6fea217dee8e4f80209124f
parentbc1c89f9d0bf77cd230e9bc3e740e1ef10b5f455 (diff)
debian/libpam-modules.postinst: if any 'min=n' options are found in
/etc/pam.d/common-password, convert them on upgrade to 'minlen=n' for compatibility with upstream.
-rw-r--r--debian/changelog3
-rw-r--r--debian/libpam-modules.postinst8
2 files changed, 11 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 5607bcff..088ac6f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,9 @@ pam (1.1.1-5) UNRELEASED; urgency=low
setfsuid, so patch them to be likewise Hurd-safe.
* Update debian/source.lintian-overrides to clean up some spurious
warnings.
+ * debian/libpam-modules.postinst: if any 'min=n' options are found in
+ /etc/pam.d/common-password, convert them on upgrade to 'minlen=n' for
+ compatibility with upstream.
-- Steve Langasek <vorlon@debian.org> Sun, 29 Aug 2010 00:56:28 -0700
diff --git a/debian/libpam-modules.postinst b/debian/libpam-modules.postinst
index 723877cf..ce03090b 100644
--- a/debian/libpam-modules.postinst
+++ b/debian/libpam-modules.postinst
@@ -17,4 +17,12 @@ 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#