diff options
author | Steve Langasek <vorlon@debian.org> | 2010-08-31 23:08:28 -0700 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-08 21:48:26 -0800 |
commit | 51af808526e0273d607d3cdf061e14ccaa0d96de (patch) | |
tree | bf7f8513af2e7cbae6fea217dee8e4f80209124f /debian/libpam-modules.postinst | |
parent | bc1c89f9d0bf77cd230e9bc3e740e1ef10b5f455 (diff) | |
download | pam-51af808526e0273d607d3cdf061e14ccaa0d96de.tar.gz pam-51af808526e0273d607d3cdf061e14ccaa0d96de.tar.bz2 pam-51af808526e0273d607d3cdf061e14ccaa0d96de.zip |
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.
Diffstat (limited to 'debian/libpam-modules.postinst')
-rw-r--r-- | debian/libpam-modules.postinst | 8 |
1 files changed, 8 insertions, 0 deletions
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# |