From cc0603d4b6421fa3ce23c273bc254f5dd0a6f0f6 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 6 Dec 2004 23:13:50 +1100 Subject: - dtucker@cvs.openbsd.org 2004/11/25 09:39:27 [test-exec.sh] Remove obsolete RhostsAuthentication from test config; ok markus@ --- regress/test-exec.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'regress/test-exec.sh') diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 70250acd7..4e69658ce 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.23 2004/06/25 01:25:12 djm Exp $ +# $OpenBSD: test-exec.sh,v 1.24 2004/11/25 09:39:27 dtucker Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -205,7 +205,6 @@ Host * ChallengeResponseAuthentication no HostbasedAuthentication no PasswordAuthentication no - RhostsRSAAuthentication no BatchMode yes StrictHostKeyChecking yes EOF -- cgit v1.2.3 From d028fea13a24c2728e00bba98e7ff73a0470792d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 6 Dec 2004 23:16:29 +1100 Subject: - dtucker@cvs.openbsd.org 2004/12/06 10:49:56 [test-exec.sh] Check if TEST_SSH_SSHD is a full path to sshd before searching; ok markus@ --- ChangeLog | 5 ++++- regress/test-exec.sh | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'regress/test-exec.sh') diff --git a/ChangeLog b/ChangeLog index 85591f0b4..162890ec5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -44,6 +44,9 @@ - dtucker@cvs.openbsd.org 2004/11/25 09:39:27 [test-exec.sh] Remove obsolete RhostsAuthentication from test config; ok markus@ + - dtucker@cvs.openbsd.org 2004/12/06 10:49:56 + [test-exec.sh] + Check if TEST_SSH_SSHD is a full path to sshd before searching; ok markus@ 20041203 - (dtucker) OpenBSD CVS Sync @@ -1917,4 +1920,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3597 2004/12/06 12:13:50 dtucker Exp $ +$Id: ChangeLog,v 1.3598 2004/12/06 12:16:29 dtucker Exp $ diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 4e69658ce..a57e46e59 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.24 2004/11/25 09:39:27 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.25 2004/12/06 10:49:56 dtucker Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -83,7 +83,9 @@ if [ "x$TEST_SSH_SCP" != "x" ]; then fi # Path to sshd must be absolute for rexec -SSHD=`which sshd` +if [ ! -x /$SSHD ]; then + SSHD=`which sshd` +fi # these should be used in tests export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP -- cgit v1.2.3 From feb6f7f24424105e649dbb2b3433352eb29b6764 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Tue, 8 Feb 2005 20:17:17 +1100 Subject: - (dtucker) [regress/test-exec.sh] Bug #912: Set _POSIX2_VERSION for the regress tests so newer versions of GNU head(1) behave themselves. Patch by djm, so ok me. --- ChangeLog | 7 ++++++- regress/test-exec.sh | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'regress/test-exec.sh') diff --git a/ChangeLog b/ChangeLog index 9c36570c6..841c7bd32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +20050208 + - (dtucker) [regress/test-exec.sh] Bug #912: Set _POSIX2_VERSION for the + regress tests so newer versions of GNU head(1) behave themselves. Patch + by djm, so ok me. + 20050204 - (dtucker) [monitor.c] Permit INVALID_USER audit events from slave too. - (dtucker) [auth.c] Fix parens in audit log check. @@ -2076,4 +2081,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3636 2005/02/04 04:19:44 dtucker Exp $ +$Id: ChangeLog,v 1.3637 2005/02/08 09:17:17 dtucker Exp $ diff --git a/regress/test-exec.sh b/regress/test-exec.sh index a57e46e59..4f10c2ba1 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -3,6 +3,10 @@ #SUDO=sudo +# Unbreak GNU head(1) +_POSIX2_VERSION=199209 +export _POSIX2_VERSION + if [ ! -z "$TEST_SSH_PORT" ]; then PORT="$TEST_SSH_PORT" else -- cgit v1.2.3 From b712fccc18b218e98bd6ef69c85308cd00a6e543 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 7 Mar 2005 18:27:28 +1100 Subject: - david@cvs.openbsd.org 2005/01/14 04:21:18 [Makefile test-exec.sh] pass the SUDO make variable to the individual sh tests; ok dtucker@ markus@ --- ChangeLog | 5 ++++- regress/Makefile | 4 ++-- regress/test-exec.sh | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'regress/test-exec.sh') diff --git a/ChangeLog b/ChangeLog index 1949e264d..4d4f04909 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ - fgsch@cvs.openbsd.org 2004/12/10 01:31:30 [Makefile sftp-glob.sh] some globbing regress; prompted and ok djm@ + - david@cvs.openbsd.org 2005/01/14 04:21:18 + [Makefile test-exec.sh] + pass the SUDO make variable to the individual sh tests; ok dtucker@ markus@ 20050306 - (dtucker) [monitor.c] Bug #125 comment #47: fix errors returned by monitor @@ -2291,4 +2294,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3696 2005/03/07 07:25:53 dtucker Exp $ +$Id: ChangeLog,v 1.3697 2005/03/07 07:27:28 dtucker Exp $ diff --git a/regress/Makefile b/regress/Makefile index 0536ee7b9..eee1f3bf2 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.34 2004/12/10 01:31:30 fgsch Exp $ +# $OpenBSD: Makefile,v 1.35 2005/01/14 04:21:18 david Exp $ REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec tests: $(REGRESS_TARGETS) @@ -92,5 +92,5 @@ t-exec: ${LTESTS:=.sh} @if [ "x$?" = "x" ]; then exit 0; fi; \ for TEST in ""$?; do \ echo "run test $${TEST}" ... 1>&2; \ - (sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ + (env SUDO=${SUDO} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ done diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 4f10c2ba1..346b68f16 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.25 2004/12/06 10:49:56 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.26 2005/01/14 04:21:18 david Exp $ # Placed in the Public Domain. #SUDO=sudo -- cgit v1.2.3 From a0f3ba71a01428fb468ee7a6bc2fed42436c83f8 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 7 Mar 2005 18:33:02 +1100 Subject: - dtucker@cvs.openbsd.org 2005/02/27 11:33:30 [multiplex.sh test-exec.sh sshd-log-wrapper.sh] Add optional capability to log output from regress commands; ok markus@ Use with: make TEST_SSH_LOGFILE=/tmp/regress.log --- ChangeLog | 6 +++++- regress/multiplex.sh | 7 ++++--- regress/sshd-log-wrapper.sh | 13 +++++++++++++ regress/test-exec.sh | 18 ++++++++++++++---- 4 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 regress/sshd-log-wrapper.sh (limited to 'regress/test-exec.sh') diff --git a/ChangeLog b/ChangeLog index 4d4f04909..1771d0da1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,10 @@ - david@cvs.openbsd.org 2005/01/14 04:21:18 [Makefile test-exec.sh] pass the SUDO make variable to the individual sh tests; ok dtucker@ markus@ + - dtucker@cvs.openbsd.org 2005/02/27 11:33:30 + [multiplex.sh test-exec.sh sshd-log-wrapper.sh] + Add optional capability to log output from regress commands; ok markus@ + Use with: make TEST_SSH_LOGFILE=/tmp/regress.log 20050306 - (dtucker) [monitor.c] Bug #125 comment #47: fix errors returned by monitor @@ -2294,4 +2298,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3697 2005/03/07 07:27:28 dtucker Exp $ +$Id: ChangeLog,v 1.3698 2005/03/07 07:33:02 dtucker Exp $ diff --git a/regress/multiplex.sh b/regress/multiplex.sh index 15e518c86..e8cc1ac53 100644 --- a/regress/multiplex.sh +++ b/regress/multiplex.sh @@ -1,4 +1,4 @@ -# $OpenBSD: multiplex.sh,v 1.9 2004/11/07 00:32:41 djm Exp $ +# $OpenBSD: multiplex.sh,v 1.10 2005/02/27 11:33:30 dtucker Exp $ # Placed in the Public Domain. CTL=$OBJ/ctl-sock @@ -13,6 +13,7 @@ fi DATA=/bin/ls${EXEEXT} COPY=$OBJ/ls.copy +LOG=$TEST_SSH_LOGFILE start_sshd @@ -48,13 +49,13 @@ cmp ${DATA} ${COPY} || fail "ssh -S ctl: corrupted copy of ${DATA}" rm -f ${COPY} trace "sftp transfer over multiplexed connection and check result" echo "get ${DATA} ${COPY}" | \ - ${SFTP} -S ${SSH} -oControlPath=$CTL otherhost >/dev/null 2>&1 + ${SFTP} -S ${SSH} -oControlPath=$CTL otherhost >$LOG 2>&1 test -f ${COPY} || fail "sftp: failed copy ${DATA}" cmp ${DATA} ${COPY} || fail "sftp: corrupted copy of ${DATA}" rm -f ${COPY} trace "scp transfer over multiplexed connection and check result" -${SCP} -S ${SSH} -oControlPath=$CTL otherhost:${DATA} ${COPY} >/dev/null 2>&1 +${SCP} -S ${SSH} -oControlPath=$CTL otherhost:${DATA} ${COPY} >$LOG 2>&1 test -f ${COPY} || fail "scp: failed copy ${DATA}" cmp ${DATA} ${COPY} || fail "scp: corrupted copy of ${DATA}" diff --git a/regress/sshd-log-wrapper.sh b/regress/sshd-log-wrapper.sh new file mode 100644 index 000000000..c7a5ef3a6 --- /dev/null +++ b/regress/sshd-log-wrapper.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# $OpenBSD: sshd-log-wrapper.sh,v 1.2 2005/02/27 11:40:30 dtucker Exp $ +# Placed in the Public Domain. +# +# simple wrapper for sshd proxy mode to catch stderr output +# sh sshd-log-wrapper.sh /path/to/sshd /path/to/logfile + +sshd=$1 +log=$2 +shift +shift + +exec $sshd $@ -e 2>>$log diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 346b68f16..958c87109 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.26 2005/01/14 04:21:18 david Exp $ +# $OpenBSD: test-exec.sh,v 1.27 2005/02/27 11:33:30 dtucker Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -47,6 +47,8 @@ else fi unset SSH_AUTH_SOCK +SRC=`dirname ${SCRIPT}` + # defaults SSH=ssh SSHD=sshd @@ -91,6 +93,10 @@ if [ ! -x /$SSHD ]; then SSHD=`which sshd` fi +if [ "x$TEST_SSH_LOGFILE" = "x" ]; then + TEST_SSH_LOGFILE=/dev/null +fi + # these should be used in tests export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP @@ -140,6 +146,7 @@ cleanup () trace () { + echo "trace: $@" >>$TEST_SSH_LOGFILE if [ "X$TEST_SSH_TRACE" = "Xyes" ]; then echo "$@" fi @@ -147,6 +154,7 @@ trace () verbose () { + echo "verbose: $@" >>$TEST_SSH_LOGFILE if [ "X$TEST_SSH_QUIET" != "Xyes" ]; then echo "$@" fi @@ -155,12 +163,14 @@ verbose () fail () { + echo "FAIL: $@" >>$TEST_SSH_LOGFILE RESULT=1 echo "$@" } fatal () { + echo "FATAL: $@" >>$TEST_SSH_LOGFILE echon "FATAL: " fail "$@" cleanup @@ -180,7 +190,7 @@ cat << EOF > $OBJ/sshd_config #ListenAddress ::1 PidFile $PIDFILE AuthorizedKeysFile $OBJ/authorized_keys_%u - LogLevel QUIET + LogLevel DEBUG AcceptEnv _XXX_TEST_* AcceptEnv _XXX_TEST Subsystem sftp $SFTPSERVER @@ -251,7 +261,7 @@ chmod 644 $OBJ/authorized_keys_$USER # create a proxy version of the client config ( cat $OBJ/ssh_config - echo proxycommand ${SUDO} ${SSHD} -i -f $OBJ/sshd_proxy + echo proxycommand sh ${SRC}/sshd-log-wrapper.sh ${SUDO} ${SSHD} ${TEST_SSH_LOGFILE} -i -f $OBJ/sshd_proxy ) > $OBJ/ssh_proxy # check proxy config @@ -261,7 +271,7 @@ start_sshd () { # start sshd $SUDO ${SSHD} -f $OBJ/sshd_config -t || fatal "sshd_config broken" - $SUDO ${SSHD} -f $OBJ/sshd_config + $SUDO ${SSHD} -f $OBJ/sshd_config -e >>$TEST_SSH_LOGFILE 2>&1 trace "wait for sshd" i=0; -- cgit v1.2.3 From 4b9ac3319e78621eb38a993c0627654c08d7c1ad Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 7 Mar 2005 19:15:06 +1100 Subject: - (dtucker) [regress/test-exec.sh] Put SUDO in the right place. --- ChangeLog | 3 ++- regress/test-exec.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'regress/test-exec.sh') diff --git a/ChangeLog b/ChangeLog index 1c02ab321..bf577514b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,7 @@ - djm@cvs.openbsd.org 2005/03/04 08:48:46 [Makefile envpass.sh] regress test for SendEnv config parsing bug; ok dtucker@ + - (dtucker) [regress/test-exec.sh] Put SUDO in the right place. 20050306 - (dtucker) [monitor.c] Bug #125 comment #47: fix errors returned by monitor @@ -2304,4 +2305,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3700 2005/03/07 07:35:34 dtucker Exp $ +$Id: ChangeLog,v 1.3701 2005/03/07 08:15:06 dtucker Exp $ diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 958c87109..347cccec1 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -261,7 +261,7 @@ chmod 644 $OBJ/authorized_keys_$USER # create a proxy version of the client config ( cat $OBJ/ssh_config - echo proxycommand sh ${SRC}/sshd-log-wrapper.sh ${SUDO} ${SSHD} ${TEST_SSH_LOGFILE} -i -f $OBJ/sshd_proxy + echo proxycommand ${SUDO} sh ${SRC}/sshd-log-wrapper.sh ${SSHD} ${TEST_SSH_LOGFILE} -i -f $OBJ/sshd_proxy ) > $OBJ/ssh_proxy # check proxy config -- cgit v1.2.3 From 50c7db92d6222a753b03a23bb041ed86febd2057 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 9 Mar 2005 10:02:55 +1100 Subject: - (dtucker) [regress/test-exec.sh] Set BIN_SH=xpg4 on OSF1/Digital Unix/Tru64 so that regress tests behave. From Chris Adams. --- ChangeLog | 6 +++++- regress/test-exec.sh | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'regress/test-exec.sh') diff --git a/ChangeLog b/ChangeLog index cfe5e81b3..5ae9d4622 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20050309 + - (dtucker) [regress/test-exec.sh] Set BIN_SH=xpg4 on OSF1/Digital Unix/Tru64 + so that regress tests behave. From Chris Adams. + 20050307 - (dtucker) [configure.ac] Disable gettext search when configuring with BSM audit support for the time being. ok djm@ @@ -2306,4 +2310,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3702 2005/03/07 09:21:37 tim Exp $ +$Id: ChangeLog,v 1.3703 2005/03/08 23:02:55 dtucker Exp $ diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 347cccec1..4e53449be 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -7,6 +7,13 @@ _POSIX2_VERSION=199209 export _POSIX2_VERSION +case `uname -s 2>/dev/null` in +OSF1*) + BIN_SH=xpg4 + export BIN_SH + ;; +esac + if [ ! -z "$TEST_SSH_PORT" ]; then PORT="$TEST_SSH_PORT" else -- cgit v1.2.3