summaryrefslogtreecommitdiff
path: root/debian/libpam-runtime.postinst
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2009-08-25 17:39:44 -0700
committerSteve Langasek <vorlon@debian.org>2019-01-08 21:25:57 -0800
commitd907c391598ff1e9451ed52475c0c2bd1ca51093 (patch)
tree2fcb9eec63ad9de5d58b663af74eeff50cc4376e /debian/libpam-runtime.postinst
parent80363113ea099c359b35bce4916f8726c2b6b1be (diff)
On upgrade from versions before 1.1.0-1, if
/etc/pam.d/common-session-noninteractive has not been created (because the user declined use of pam-auth-update), create it by copying /etc/pam.d/common-session. Closes: #543401.
Diffstat (limited to 'debian/libpam-runtime.postinst')
-rw-r--r--debian/libpam-runtime.postinst4
1 files changed, 4 insertions, 0 deletions
diff --git a/debian/libpam-runtime.postinst b/debian/libpam-runtime.postinst
index dbda6895..178d0e23 100644
--- a/debian/libpam-runtime.postinst
+++ b/debian/libpam-runtime.postinst
@@ -47,6 +47,10 @@ if [ -n "$force" ]; then
/etc/pam.d/common-account.pam-old \
/etc/pam.d/common-password.pam-old \
/etc/pam.d/common-session.pam-old
+elif dpkg --compare-versions "$2" lt-nl 1.1.0-1 \
+ && [ ! -e /etc/pam.d/common-session-noninteractive ]
+then
+ cp -a /etc/pam.d/common-session /etc/pam.d/common-session-noninteractive
fi
if [ -n "$UHOH" ]; then