summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh30
1 files changed, 17 insertions, 13 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 74b365cac..bfa48803b 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: test-exec.sh,v 1.53 2016/04/15 02:57:10 djm Exp $ 1# $OpenBSD: test-exec.sh,v 1.58 2016/12/16 01:06:27 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4#SUDO=sudo 4#SUDO=sudo
@@ -130,7 +130,8 @@ if [ "x$TEST_SSH_CONCH" != "x" ]; then
130 esac 130 esac
131fi 131fi
132 132
133SSH_PROTOCOLS=`$SSH -Q protocol-version` 133SSH_PROTOCOLS=2
134#SSH_PROTOCOLS=`$SSH -Q protocol-version`
134if [ "x$TEST_SSH_PROTOCOLS" != "x" ]; then 135if [ "x$TEST_SSH_PROTOCOLS" != "x" ]; then
135 SSH_PROTOCOLS="${TEST_SSH_PROTOCOLS}" 136 SSH_PROTOCOLS="${TEST_SSH_PROTOCOLS}"
136fi 137fi
@@ -292,16 +293,8 @@ md5 () {
292} 293}
293# End of portable specific functions 294# End of portable specific functions
294 295
295# helper 296stop_sshd ()
296cleanup ()
297{ 297{
298 if [ "x$SSH_PID" != "x" ]; then
299 if [ $SSH_PID -lt 2 ]; then
300 echo bad pid for ssh: $SSH_PID
301 else
302 kill $SSH_PID
303 fi
304 fi
305 if [ -f $PIDFILE ]; then 298 if [ -f $PIDFILE ]; then
306 pid=`$SUDO cat $PIDFILE` 299 pid=`$SUDO cat $PIDFILE`
307 if [ "X$pid" = "X" ]; then 300 if [ "X$pid" = "X" ]; then
@@ -324,6 +317,19 @@ cleanup ()
324 fi 317 fi
325} 318}
326 319
320# helper
321cleanup ()
322{
323 if [ "x$SSH_PID" != "x" ]; then
324 if [ $SSH_PID -lt 2 ]; then
325 echo bad pid for ssh: $SSH_PID
326 else
327 kill $SSH_PID
328 fi
329 fi
330 stop_sshd
331}
332
327start_debug_log () 333start_debug_log ()
328{ 334{
329 echo "trace: $@" >$TEST_REGRESS_LOGFILE 335 echo "trace: $@" >$TEST_REGRESS_LOGFILE
@@ -400,7 +406,6 @@ fi
400cat << EOF > $OBJ/sshd_config 406cat << EOF > $OBJ/sshd_config
401 StrictModes no 407 StrictModes no
402 Port $PORT 408 Port $PORT
403 Protocol $PROTO
404 AddressFamily inet 409 AddressFamily inet
405 ListenAddress 127.0.0.1 410 ListenAddress 127.0.0.1
406 #ListenAddress ::1 411 #ListenAddress ::1
@@ -433,7 +438,6 @@ echo 'StrictModes no' >> $OBJ/sshd_proxy
433# create client config 438# create client config
434cat << EOF > $OBJ/ssh_config 439cat << EOF > $OBJ/ssh_config
435Host * 440Host *
436 Protocol $PROTO
437 Hostname 127.0.0.1 441 Hostname 127.0.0.1
438 HostKeyAlias localhost-with-alias 442 HostKeyAlias localhost-with-alias
439 Port $PORT 443 Port $PORT