1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

test: adapt install_pam() for openSUSE

On openSUSE the default pam config files are shipped in /usr/etc/pam.d.

Also empty password is not allowed by default.
This commit is contained in:
Franck Bui 2021-08-05 15:34:37 +02:00
parent d8167c5212
commit 138f761904

View File

@ -1587,7 +1587,7 @@ install_pam() {
paths+=(/lib*/security) paths+=(/lib*/security)
fi fi
for d in /etc/pam.d /etc/security /usr/lib/pam.d; do for d in /etc/pam.d /etc/security /usr/{etc,lib}/pam.d; do
[ -d "$d" ] && paths+=("$d") [ -d "$d" ] && paths+=("$d")
done done
@ -1601,6 +1601,13 @@ install_pam() {
# set empty root password for easy debugging # set empty root password for easy debugging
sed -i 's/^root:x:/root::/' "${initdir:?}/etc/passwd" sed -i 's/^root:x:/root::/' "${initdir:?}/etc/passwd"
# And make sure pam_unix will accept it by making sure that
# the PAM module has the nullok option.
for d in /etc/pam.d /usr/{etc,lib}/pam.d; do
[ -d "$initdir/$d" ] || continue
sed -i '/^auth.*pam_unix.so/s/$/ nullok/' "$initdir/$d"/*
done
} }
install_keymaps() { install_keymaps() {