diff options
author | Steve Langasek <steve.langasek@canonical.com> | 2022-10-05 20:57:42 -0700 |
---|---|---|
committer | Steve Langasek <steve.langasek@canonical.com> | 2022-10-05 21:00:08 -0700 |
commit | 714a766fcbe0d2cef9cdbefcd247be3aae5d6eef (patch) | |
tree | 70f577a20a44f79ff478bd53029ec1b84d5b7102 | |
parent | fe1bf3cf4966b89d75f0de6892de494187a03e57 (diff) | |
parent | c1d908caf86eadc25a42c35bab355b4a6709a190 (diff) | |
download | pam-714a766fcbe0d2cef9cdbefcd247be3aae5d6eef.tar.gz pam-714a766fcbe0d2cef9cdbefcd247be3aae5d6eef.tar.bz2 pam-714a766fcbe0d2cef9cdbefcd247be3aae5d6eef.zip |
Merge remote-tracking branch 'josch/dpkg-root'
Support DPKG_ROOT in the postinst scripts.
Thanks, Johannes Schauer Marin Rodrigues.
Bug-Debian: https://bugs.debian.org/993161
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/libpam-modules.postinst | 8 | ||||
-rw-r--r-- | debian/libpam-runtime.postinst | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index 659d1ca7..c76137a4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ pam (1.5.2-3) UNRELEASED; urgency=medium file, it's covered by the existing globs. * debian/local/Debian-PAM-MiniPolicy: drop references to ancient package versions. Thanks, Marc Haber. + * Support DPKG_ROOT in the postinst scripts. Closes: #993161. + Thanks, Johannes Schauer Marin Rodrigues. -- Steve Langasek <vorlon@debian.org> Thu, 18 Aug 2022 18:26:29 +0000 diff --git a/debian/libpam-modules.postinst b/debian/libpam-modules.postinst index 723877cf..20b6bf17 100644 --- a/debian/libpam-modules.postinst +++ b/debian/libpam-modules.postinst @@ -5,16 +5,16 @@ if [ -z "$2" ] || dpkg --compare-versions "$2" lt 0.99.7.1-3 then - if ! [ -f /etc/security/opasswd ]; then + if ! [ -f "$DPKG_ROOT/etc/security/opasswd" ]; then umask 066 - touch /etc/security/opasswd + touch "$DPKG_ROOT/etc/security/opasswd" umask 022 fi fi -if dpkg --compare-versions "$2" lt 0.99.9.0-1 && ! [ -f /etc/environment ] +if dpkg --compare-versions "$2" lt 0.99.9.0-1 && ! [ -f "$DPKG_ROOT/etc/environment" ] then - touch /etc/environment + touch "$DPKG_ROOT/etc/environment" fi #DEBHELPER# diff --git a/debian/libpam-runtime.postinst b/debian/libpam-runtime.postinst index b13bf75c..792f44ff 100644 --- a/debian/libpam-runtime.postinst +++ b/debian/libpam-runtime.postinst @@ -20,9 +20,9 @@ then for configfile in common-auth common-account common-session \ common-password do - if [ -f /etc/pam.d/$configfile ] && \ + if [ -f "$DPKG_ROOT/etc/pam.d/$configfile" ] && \ ! fgrep -q $(calculate_md5sum $configfile) \ - /usr/share/pam/$configfile.md5sums 2>/dev/null + "$DPKG_ROOT/usr/share/pam/$configfile.md5sums" 2>/dev/null then force= fi |