X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/c9535c4d738ebbb0942b52037b36d51856e620c6..c23cfd0df22e1b5fa68cd3b8bfa1d60f220a4905:/regress/dynamic-forward.sh diff --git a/regress/dynamic-forward.sh b/regress/dynamic-forward.sh index 4931e95c..4674a7ba 100644 --- a/regress/dynamic-forward.sh +++ b/regress/dynamic-forward.sh @@ -1,14 +1,15 @@ -# $OpenBSD: dynamic-forward.sh,v 1.2 2003/07/03 08:21:46 markus Exp $ +# $OpenBSD: dynamic-forward.sh,v 1.4 2004/06/22 22:55:56 dtucker Exp $ # Placed in the Public Domain. tid="dynamic forwarding" -PORT=4242 -FWDPORT=4243 +FWDPORT=`expr $PORT + 1` -if [ -x "`which nc 2>&1`" ] && nc -h 2>&1 | grep "x proxy address" >/dev/null; then +DATA=/bin/ls${EXEEXT} + +if have_prog nc && nc -h 2>&1 | grep "proxy address" >/dev/null; then proxycmd="nc -x 127.0.0.1:$FWDPORT -X" -elif [ -x "`which connect 2>&1`" ]; then +elif have_prog connect; then proxycmd="connect -S 127.0.0.1:$FWDPORT -" else echo "skipped (no suitable ProxyCommand found)" @@ -28,9 +29,9 @@ for p in 1 2; do trace "testing ssh protocol $p socks version $s host $h" ${SSH} -F $OBJ/ssh_config \ -o "ProxyCommand ${proxycmd}${s} $h $PORT" \ - somehost cat /bin/ls > $OBJ/ls.copy - test -f $OBJ/ls.copy || fail "failed copy /bin/ls" - cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" + somehost cat $DATA > $OBJ/ls.copy + test -f $OBJ/ls.copy || fail "failed copy $DATA" + cmp $DATA $OBJ/ls.copy || fail "corrupted copy of $DATA" done done @@ -43,4 +44,7 @@ for p in 1 2; do else fail "no pid file: $OBJ/remote_pid" fi + + # Must allow time for connection tear-down + sleep 2 done