test/test-functions: copy /usr/lib/pam.d into $initdir
authorDan Streetman <ddstreet@canonical.com>
Fri, 20 Nov 2020 18:41:03 +0000 (13:41 -0500)
committerMichael Biebl <biebl@debian.org>
Tue, 24 Nov 2020 20:53:25 +0000 (20:53 +0000)
The systemd-user file has been moved from /etc/pam.d into /usr/lib/pam.d,
so test-functions needs to copy it from /usr/lib/pam.d instead.

This will copy it from either location.

(cherry picked from commit 3965279c67b3b7b49d29e257b347fa4aee75b60a)

Gbp-Pq: Name test-test-functions-copy-usr-lib-pam.d-into-initdir.patch

test/test-functions

index 863cc18aeff0d29cbe9e801b7f72c70f5604768e..75b5230743503339fddedca9c7fceb11b9006e30 100644 (file)
@@ -1058,7 +1058,9 @@ install_pam() {
     else
         find /lib*/security -xtype f
     fi
-    find /etc/pam.d /etc/security -xtype f
+    for d in /etc/pam.d /etc/security /usr/lib/pam.d; do
+        [ -d "$d" ] && find $d -xtype f
+    done
     ) | while read file; do
         inst $file
     done
@@ -1067,9 +1069,6 @@ install_pam() {
     # see http://www.linux-pam.org/Linux-PAM-html/sag-pam_unix.html
     dracut_install -o unix_chkpwd
 
-    [[ "$LOOKS_LIKE_DEBIAN" ]] &&
-        cp /etc/pam.d/systemd-user $initdir/etc/pam.d/
-
     # set empty root password for easy debugging
     sed -i 's/^root:x:/root::/' $initdir/etc/passwd
 }