From b0d6b50dd63729879b652d73a6104302c92f7884 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 5 Oct 2022 21:04:35 -0700 Subject: Further proof libpam-runtime postinst for DPKG_ROOT just in case. --- debian/changelog | 1 + debian/libpam-runtime.postinst | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c76137a4..ad2e956e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ pam (1.5.2-3) UNRELEASED; urgency=medium package versions. Thanks, Marc Haber. * Support DPKG_ROOT in the postinst scripts. Closes: #993161. Thanks, Johannes Schauer Marin Rodrigues. + * Further proof libpam-runtime postinst for DPKG_ROOT just in case. -- Steve Langasek Thu, 18 Aug 2022 18:26:29 +0000 diff --git a/debian/libpam-runtime.postinst b/debian/libpam-runtime.postinst index 03628cfe..667b33a6 100644 --- a/debian/libpam-runtime.postinst +++ b/debian/libpam-runtime.postinst @@ -8,7 +8,7 @@ calculate_md5sum() 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 }' + "$DPKG_ROOT"/etc/pam.d/"$configfile" | md5sum | awk '{ print $1 }' } # If the user has removed the config file, respect this sign of dementia @@ -32,10 +32,10 @@ fi pam-auth-update --root "$DPKG_ROOT" --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 + rm -f "$DPKG_ROOT"/etc/pam.d/common-auth.pam-old \ + "$DPKG_ROOT"/etc/pam.d/common-account.pam-old \ + "$DPKG_ROOT"/etc/pam.d/common-password.pam-old \ + "$DPKG_ROOT"/etc/pam.d/common-session.pam-old fi #DEBHELPER# -- cgit v1.2.3