aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvorlon <Unknown>2007-08-27 09:26:56 +0000
committervorlon <Unknown>2007-08-27 09:26:56 +0000
commita035dab5356e56037f5da614ec7e0b0bdffdf7ea (patch)
treee609222c586e42d57c865def05ed53435125c86b
parentb39ea898589aaff07207526691415005cab1fda4 (diff)
downloadpam-a035dab5356e56037f5da614ec7e0b0bdffdf7ea.tar.gz
pam-a035dab5356e56037f5da614ec7e0b0bdffdf7ea.tar.bz2
pam-a035dab5356e56037f5da614ec7e0b0bdffdf7ea.zip
Create /etc/security/opasswd on new installs or on upgrades from 0.99.7.1-2
or below, so that users that enable the remember=<n> option to pam_unix aren't left unable to change passwords. Closes: #95324.
-rw-r--r--changelog5
-rw-r--r--libpam-modules.postinst15
2 files changed, 19 insertions, 1 deletions
diff --git a/changelog b/changelog
index d5e5d9c6..1cb178eb 100644
--- a/changelog
+++ b/changelog
@@ -11,8 +11,11 @@ pam (0.99.7.1-3) UNRELEASED; urgency=low
version of cracklib, and define our path in debian/rules.
* 055_pam_unix_nullok_secure: document the pam_unix "nullok_secure" option,
a prereq for forwarding this patch upstream. Closes: #325974.
+ * Create /etc/security/opasswd on new installs or on upgrades from
+ 0.99.7.1-2 or below, so that users that enable the remember=<n> option to
+ pam_unix aren't left unable to change passwords. Closes: #95324.
- -- Steve Langasek <vorlon@debian.org> Mon, 27 Aug 2007 02:10:32 -0700
+ -- Steve Langasek <vorlon@debian.org> Mon, 27 Aug 2007 02:17:52 -0700
pam (0.99.7.1-2) unstable; urgency=low
diff --git a/libpam-modules.postinst b/libpam-modules.postinst
new file mode 100644
index 00000000..b9269f85
--- /dev/null
+++ b/libpam-modules.postinst
@@ -0,0 +1,15 @@
+#!/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-2
+then
+ if ! [ -f /etc/security/opasswd ]; then
+ umask 066
+ touch /etc/security/opasswd
+ umask 022
+ fi
+fi
+
+#DEBHELPER#