Skip to content

Commit

Permalink
upstream: Specify ssh binary to use
Browse files Browse the repository at this point in the history
... instead of relying on installed one.  Fixes test failures in -portable
when running tests prior to installation.

OpenBSD-Regress-ID: b6d6ba71c23209c616efc805a60d9a445d53a685
  • Loading branch information
daztucker committed Nov 1, 2023
1 parent e9fc2c4 commit c8ed7cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions regress/forcecommand.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $OpenBSD: forcecommand.sh,v 1.6 2023/11/01 00:29:46 djm Exp $
# $OpenBSD: forcecommand.sh,v 1.7 2023/11/01 02:08:38 dtucker Exp $
# Placed in the Public Domain.

tid="forced command"
Expand All @@ -19,7 +19,7 @@ trace "test config with sftp"
authorized_keys
rm -f $OBJ/ssh_proxy.tmp
echo "@get $OBJ/ssh_proxy $OBJ/ssh_proxy.tmp" | \
${SFTP} -b - -qF $OBJ/ssh_proxy somehost 2>/dev/null || \
${SFTP} -S ${SSH} -b - -qF $OBJ/ssh_proxy somehost 2>/dev/null || \
fail "sftp failed"
test -f "$OBJ/ssh_proxy.tmp" || fail "sftp did not download file"
rm -f $OBJ/ssh_proxy.tmp
Expand All @@ -41,7 +41,7 @@ echo "ForceCommand false" >> $OBJ/sshd_proxy

trace "force command overriding subsystem"
echo "@get $OBJ/ssh_proxy $OBJ/ssh_proxy.tmp" | \
${SFTP} -F $OBJ/ssh_proxy -oLoglevel=quiet somehost && \
${SFTP} -S ${SSH} -F $OBJ/ssh_proxy -oLoglevel=quiet somehost && \
fail "sftp succeeded"

echo "Match User $USER" >> $OBJ/sshd_proxy
Expand All @@ -52,7 +52,7 @@ ${SSH} -F $OBJ/ssh_proxy somehost false || fail "forced command match"

trace "force command in match overriding subsystem"
echo "@get $OBJ/ssh_proxy $OBJ/ssh_proxy.tmp" | \
${SFTP} -F $OBJ/ssh_proxy -oLoglevel=quiet somehost && \
${SFTP} -S ${SSH} -F $OBJ/ssh_proxy -oLoglevel=quiet somehost && \
fail "sftp succeeded"

trace "force command to sftpserver"
Expand All @@ -61,7 +61,7 @@ echo "Subsystem sftp /bin/false" >> $OBJ/sshd_proxy
echo "ForceCommand ${SFTPSERVER}" >> $OBJ/sshd_proxy
rm -f $OBJ/ssh_proxy.tmp
echo "@get $OBJ/ssh_proxy $OBJ/ssh_proxy.tmp" | \
${SFTP} -b - -qF $OBJ/ssh_proxy somehost 2>/dev/null || \
${SFTP} -S ${SSH} -b - -qF $OBJ/ssh_proxy somehost 2>/dev/null || \
fail "sftp failed"
test -f "$OBJ/ssh_proxy.tmp" || fail "sftp did not download file"
rm -f $OBJ/ssh_proxy.tmp

0 comments on commit c8ed7cc

Please sign in to comment.