From 9dcccafe44ea17e972e7cddea205bbe9fe71d8d6 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <jose.quaresma@foundries.io>
Date: Mon, 15 Jul 2024 18:43:08 +0100
Subject: [PATCH] regress/test-exec: use the absolute path in the SSH env

The SSHAGENT_BIN was changed in [1] to SSH_BIN but
the last one don't use the absolute path and consequently
the function increase_datafile_size can loops forever
if the binary not found.

[1] https://github.com/openssh/openssh-portable/commit/a68f80f2511f0e0c5cef737a8284cc2dfabad818

Upstream-Status: Submitted [https://github.com/openssh/openssh-portable/pull/510]

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
 regress/test-exec.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 8a00c72..2891f27 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -179,6 +179,11 @@ if [ "x$TEST_SSH_OPENSSL" != "x" ]; then
 fi
 
 # Path to sshd must be absolute for rexec
+case "$SSH" in
+/*) ;;
+*) SSH=`which $SSH` ;;
+esac
+
 case "$SSHD" in
 /*) ;;
 *) SSHD=`which $SSHD` ;;
