From 0fe15dc8ddddeb39a5cad1f4f4afa25fa074a5d1 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sun, 15 Nov 2015 20:38:56 +0000 Subject: tests: fix pam_modules installation on Debian (and Debian-like systems) libpam_modules installs modules into /lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security on Debian Fixes: systemd-testsuite login[36]: PAM unable to dlopen(pam_group.so): /lib/security/pam_group.so: cannot open shared object file: No such file or directory systemd-testsuite login[36]: PAM adding faulty module: pam_group.so systemd-testsuite login[36]: PAM unable to dlopen(pam_limits.so): /lib/security/pam_limits.so: cannot open shared object file: No such file or directory systemd-testsuite login[36]: PAM adding faulty module: pam_limits.so ... etc --- test/test-functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/test-functions') diff --git a/test/test-functions b/test/test-functions index 49f143ec1e..dcf50dd00c 100644 --- a/test/test-functions +++ b/test/test-functions @@ -4,6 +4,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin export PATH +LOOKS_LIKE_DEBIAN=$(source /etc/os-release && [[ "$ID" = "debian" || "$ID_LIKE" = "debian" ]] && echo yes) KERNEL_VER=${KERNEL_VER-$(uname -r)} KERNEL_MODS="/lib/modules/$KERNEL_VER/" @@ -272,12 +273,14 @@ install_dbus() { } install_pam() { + ( + [[ "$LOOKS_LIKE_DEBIAN" ]] && type -p dpkg-architecture &>/dev/null && find "/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security" -xtype f find \ /etc/pam.d \ /etc/security \ /lib64/security \ /lib/security -xtype f \ - | while read file; do + ) | while read file; do inst $file done } -- cgit v1.2.3-54-g00ecf From bf3a947cb44f31359bba313e0252cbcc0dc95b03 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Mon, 16 Nov 2015 03:10:54 +0000 Subject: tests: intsall /etc/login.defs Fixes: systemd-testsuite login[31]: cannot open login definitions /etc/login.defs [No such file or directory] systemd-testsuite systemd[1]: Received SIGCHLD from PID 31 (login). systemd-testsuite systemd[1]: Child 31 (login) died (code=exited, status=1/FAILURE) systemd-testsuite systemd[1]: console-getty.service: Child 31 belongs to console-getty.service systemd-testsuite systemd[1]: console-getty.service: Main process exited, code=exited, status=1/FAILURE systemd-testsuite systemd[1]: console-getty.service: Changed running -> dead on Debian/Ubuntu Useful on other distros --- test/test-functions | 1 + 1 file changed, 1 insertion(+) (limited to 'test/test-functions') diff --git a/test/test-functions b/test/test-functions index dcf50dd00c..c4cf2921c8 100644 --- a/test/test-functions +++ b/test/test-functions @@ -226,6 +226,7 @@ install_config_files() { inst /etc/sysconfig/init inst /etc/passwd inst /etc/shadow + inst /etc/login.defs inst /etc/group inst /etc/shells inst /etc/nsswitch.conf -- cgit v1.2.3-54-g00ecf