From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id AECC95A004F; Mon, 26 Aug 2024 20:41:31 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] test: Look for possible sshd-session paths (if it's there at all) in mbuto's profile Date: Mon, 26 Aug 2024 20:41:31 +0200 Message-ID: <20240826184131.1811095-1-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: S3PDI5CFLMQPKIMMEKW3HQEX5H4LVQFF X-Message-ID-Hash: S3PDI5CFLMQPKIMMEKW3HQEX5H4LVQFF X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Some distributions already have OpenSSH 9.8, which introduces split sshd/sshd-session binaries, and there we need to copy the binary from the host, which can be /usr/libexec/openssh/sshd-session (Fedora Rawhide), /usr/lib/ssh/sshd-session (Arch Linux), /usr/lib/openssh/sshd-session (Debian), and possibly other paths. Add at least those three, and, if we don't find sshd-session, assume we don't need it: it could very well be an older version of OpenSSH, as reported by David for Fedora 40, or perhaps another daemon (would Dropbear even work? I'm not sure). Reported-by: David Gibson Fixes: d6817b3930be ("test/passt.mbuto: Install sshd-session OpenSSH's split process") Signed-off-by: Stefano Brivio --- test/passt.mbuto | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/passt.mbuto b/test/passt.mbuto index 61865e8..138d365 100755 --- a/test/passt.mbuto +++ b/test/passt.mbuto @@ -13,8 +13,15 @@ PROGS="${PROGS:-ash,dash,bash ip mount ls insmod mkdir ln cat chmod lsmod modprobe find grep mknod mv rm umount jq iperf3 dhclient hostname sed tr chown sipcalc cut socat dd strace ping tail killall sleep sysctl - nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp - /usr/lib/openssh/sshd-session}" + nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp}" + +# OpenSSH 9.8 introduced split binaries, with sshd being the daemon, and +# sshd-session the per-session program. We need the latter as well, and the path +# depends on the distribution. It doesn't exist on older versions. +for bin in /usr/lib/openssh/sshd-session /usr/lib/ssh/sshd-session \ + /usr/libexec/openssh/sshd-session; do + command -v "${bin}" >/dev/null && PROGS="${PROGS} ${bin}" +done KMODS="${KMODS:- virtio_net virtio_pci vmw_vsock_virtio_transport}" -- 2.43.0