From 51af808526e0273d607d3cdf061e14ccaa0d96de Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 31 Aug 2010 23:08:28 -0700 Subject: 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. --- debian/changelog | 3 +++ debian/libpam-modules.postinst | 8 ++++++++ 2 files changed, 11 insertions(+) (limited to 'debian') 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 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# -- cgit v1.2.3