[openssh-commits] [openssh] 02/03: upstream: Add scp's path to test sshd's PATH.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Jan 13 16:04:15 AEDT 2023
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 6e6f88647042b3cde54a628545c2f5fb656a9327
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date: Fri Jan 13 04:23:00 2023 +0000
upstream: Add scp's path to test sshd's PATH.
If the scp we're testing is fully qualified (eg it's not in the system
PATH) then add its path to the under-test sshd's PATH so we can find
it. Prompted by bz#3518.
OpenBSD-Regress-ID: 7df4f5a0be3aa135495b7e5a6719d3cbc26cc4c0
---
regress/test-exec.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index c51f8eac..5a6afac5 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: test-exec.sh,v 1.92 2022/07/25 07:12:45 dtucker Exp $
+# $OpenBSD: test-exec.sh,v 1.93 2023/01/13 04:23:00 dtucker Exp $
# Placed in the Public Domain.
#SUDO=sudo
@@ -529,6 +529,13 @@ cat << EOF > $OBJ/sshd_config
Subsystem sftp $SFTPSERVER
EOF
+# If we're testing a non-installed scp, add its directory to sshd's PATH
+# so we can test it.
+case "$SCP" in
+/*) PATH_WITH_SCP="`dirname $SCP`:$PATH"
+ echo " SetEnv PATH='$PATH_WITH_SCP'" >>$OBJ/sshd_config ;;
+esac
+
# This may be necessary if /usr/src and/or /usr/obj are group-writable,
# but if you aren't careful with permissions then the unit tests could
# be abused to locally escalate privileges.
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list