From 8fddb50fd4de43993c4906baf19dae89ff8a021b Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Thu, 29 Feb 2024 13:06:28 +0100 Subject: [PATCH] test: create sshd's runtime directory (Debian variant) sshd.service on Debian uses RuntimeDirectory=sshd, without which sshd complains: [ 4065.834904] sshd[711]: Missing privilege separation directory: /run/sshd [ 4065.835785] systemd[1]: mysshserver@0-127.0.0.1:4711-127.0.0.1:58232.service: Deactivated successfully. [ 4065.836433] testsuite-46.sh[708]: kex_exchange_identification: read: Connection reset by peer [ 4065.836433] testsuite-46.sh[708]: Connection reset by 127.0.0.1 port 4711 Resolves: #31518 --- test/units/testsuite-46.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/units/testsuite-46.sh b/test/units/testsuite-46.sh index 83e96d84741..4b6ae80cb2b 100755 --- a/test/units/testsuite-46.sh +++ b/test/units/testsuite-46.sh @@ -475,8 +475,9 @@ if command -v ssh &>/dev/null && command -v sshd &>/dev/null && ! [[ -v ASAN_OPT mkdir -p /etc/ssh test -f /etc/ssh/ssh_host_ecdsa_key || ssh-keygen -t ecdsa -C '' -N '' -f /etc/ssh/ssh_host_ecdsa_key - # ssh wants this dir around, but distros cannot agree on a common name for it, let's just create all that are aware of distros use - mkdir -p /usr/share/empty.sshd /var/empty /var/empty/sshd + # ssh wants this dir around, but distros cannot agree on a common name for it, let's just create all that + # are aware of distros use + mkdir -p /usr/share/empty.sshd /var/empty /var/empty/sshd /run/sshd mv /etc/pam.d/sshd /etc/pam.d/sshd.bak cat >/etc/pam.d/sshd <