diff options
author | Niels Thykier <niels@thykier.net> | 2018-08-11 15:31:24 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2018-08-11 15:31:24 +0000 |
commit | 8d540fb940a9b4213f19c523c490642356d03edb (patch) | |
tree | e0565860842e57ceb47ab30e36c0b4325f1ff346 /debian/libpam-runtime.postinst | |
parent | 60fe4501b4194949d3117a937abdfa90d3f138e9 (diff) |
pam (1.1.8-3.8) unstable; urgency=medium
* Non-maintainer upload.
* Set Rules-Requires-Root to binary-targets as pam relies on
chgrp in debian/rules.
* Update pam-auth-update to detect write errors and properly
fail when that happens. (Closes: #880501)
* Remove Roger Leigh from uploaders as he has restired from
Debian. (Closes: #869348)
* Reduce priority of libpam0g to optional.
* Rebuild with a recent version of dpkg-source, which ensures
that the Build-Depends are correct in the .dsc file.
(Closes: #890602)
* Apply patch from Felix Lechner to make pam-auth-update ignore
editor backup files. (Closes: #519361)
* Apply update to Brazilian Portuguese translations of the
debconf templates. Thanks to Adriano Rafael Gomes.
(Closes: #799417)
[dgit import package pam 1.1.8-3.8]
Diffstat (limited to 'debian/libpam-runtime.postinst')
-rw-r--r-- | debian/libpam-runtime.postinst | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/debian/libpam-runtime.postinst b/debian/libpam-runtime.postinst new file mode 100644 index 00000000..518e8d24 --- /dev/null +++ b/debian/libpam-runtime.postinst @@ -0,0 +1,45 @@ +#!/bin/sh -e + +. /usr/share/debconf/confmodule + +calculate_md5sum() +{ + configfile="$1" + sed -n -e'1,/# here are the per-package modules (the "Primary" block)/p; + /# here.s the fallback if no module succeeds/,/# and here are more per-package modules (the "Additional" block)/p; + /# end of pam-auth-update config/,$p' \ + /etc/pam.d/"$configfile" | md5sum | awk '{ print $1 }' +} + +# If the user has removed the config file, respect this sign of dementia +# -- only create on package install. +force= +if [ -z "$2" ] || dpkg --compare-versions "$2" lt 1.0.1-11 +then + force=--force + for configfile in common-auth common-account common-session \ + common-password + do + if [ -f /etc/pam.d/$configfile ] && \ + ! fgrep -q $(calculate_md5sum $configfile) \ + /usr/share/pam/$configfile.md5sums 2>/dev/null + then + force= + fi + done +fi + +pam-auth-update --package $force + +if [ -n "$force" ]; then + rm -f /etc/pam.d/common-auth.pam-old \ + /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 + +#DEBHELPER# |