]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: create sshd's runtime directory (Debian variant) 31544/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 29 Feb 2024 12:06:28 +0000 (13:06 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 29 Feb 2024 12:44:29 +0000 (13:44 +0100)
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

index 83e96d8474196f0de464afbfa47ca4b5ad627eaf..4b6ae80cb2bcd51e55657bf5ba630deddbf3acd7 100755 (executable)
@@ -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 <<EOF