From 2a81adc35c51668374b40661e1a0eaac8e53ef74 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 29 Aug 2004 17:09:34 +1000 Subject: - (dtucker) [regress/multiplex.sh] Skip test on platforms that do not support FD passing since multiplex requires it. Noted by tim@ --- regress/multiplex.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'regress') diff --git a/regress/multiplex.sh b/regress/multiplex.sh index dbf2025be..c0adf109f 100644 --- a/regress/multiplex.sh +++ b/regress/multiplex.sh @@ -5,6 +5,12 @@ CTL=$OBJ/ctl-sock tid="connection multiplexing" +if grep "#define.*DISABLE_FD_PASSING" ${BUILDDIR}/config.h >/dev/null 2>&1 +then + echo "skipped (not supported on this platform)" + exit 0 +fi + DATA=/bin/ls${EXEEXT} COPY=$OBJ/ls.copy -- cgit v1.2.3 From 07d30e4579b183af97b7ccc880f256d4334930bd Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 29 Aug 2004 17:14:31 +1000 Subject: - (dtucker) [regress/dynamic-forward.sh] Allow time for connections to be torn down, needed on some platforms, should be harmless on others. Patch from jason at devrandom.org. --- ChangeLog | 5 ++++- regress/dynamic-forward.sh | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 095571810..c2c0a6acd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,9 @@ fixes configure warning on Solaris reported by wknox at mitre.org. - (dtucker) [regress/multiplex.sh] Skip test on platforms that do not support FD passing since multiplex requires it. Noted by tim@ + - (dtucker) [regress/dynamic-forward.sh] Allow time for connections to be torn + down, needed on some platforms, should be harmless on others. Patch from + jason at devrandom.org. 20040828 - (dtucker) [openbsd-compat/mktemp.c] Remove superfluous Cygwin #ifdef; from @@ -1694,4 +1697,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.3530 2004/08/29 07:09:34 dtucker Exp $ +$Id: ChangeLog,v 1.3531 2004/08/29 07:14:31 dtucker Exp $ diff --git a/regress/dynamic-forward.sh b/regress/dynamic-forward.sh index 392fc1978..321fde4cd 100644 --- a/regress/dynamic-forward.sh +++ b/regress/dynamic-forward.sh @@ -44,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 -- cgit v1.2.3 From 0521dcb22eb6c5478c4b652cfc6bb777499aeba7 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 29 Aug 2004 19:39:09 +1000 Subject: - (dtucker) [regress/scp.sh] Make this work on Cygwin too, which doesn't like files ending in .exe that aren't binaries; patch from vinschen at redhat.com. --- ChangeLog | 4 +++- regress/scp.sh | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index c2c0a6acd..0680b2201 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,8 @@ - (dtucker) [regress/dynamic-forward.sh] Allow time for connections to be torn down, needed on some platforms, should be harmless on others. Patch from jason at devrandom.org. + - (dtucker) [regress/scp.sh] Make this work on Cygwin too, which doesn't like + files ending in .exe that aren't binaries; patch from vinschen at redhat.com. 20040828 - (dtucker) [openbsd-compat/mktemp.c] Remove superfluous Cygwin #ifdef; from @@ -1697,4 +1699,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.3531 2004/08/29 07:14:31 dtucker Exp $ +$Id: ChangeLog,v 1.3532 2004/08/29 09:39:09 dtucker Exp $ diff --git a/regress/scp.sh b/regress/scp.sh index 703cc0893..6b5664283 100644 --- a/regress/scp.sh +++ b/regress/scp.sh @@ -12,16 +12,16 @@ else DIFFOPT="-r" fi -DATA=/bin/ls +DATA=/bin/ls${EXEEXT} COPY=${OBJ}/copy COPY2=${OBJ}/copy2 DIR=${COPY}.dd DIR2=${COPY}.dd2 SRC=`dirname ${SCRIPT}` -cp ${SRC}/scp-ssh-wrapper.sh ${OBJ}/scp-ssh-wrapper.exe -chmod 755 ${OBJ}/scp-ssh-wrapper.exe -scpopts="-q -S ${OBJ}/scp-ssh-wrapper.exe" +cp ${SRC}/scp-ssh-wrapper.sh ${OBJ}/scp-ssh-wrapper.scp +chmod 755 ${OBJ}/scp-ssh-wrapper.scp +scpopts="-q -S ${OBJ}/scp-ssh-wrapper.scp" scpclean() { rm -rf ${COPY} ${COPY2} ${DIR} ${DIR2} @@ -79,4 +79,4 @@ for i in 0 1 2 3 4; do done scpclean -rm -f ${OBJ}/scp-ssh-wrapper.exe +rm -f ${OBJ}/scp-ssh-wrapper.scp -- cgit v1.2.3 From b17035fb7ffefc984e76a92e6cbbc051fc8fbe97 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 29 Aug 2004 20:33:07 +1000 Subject: - (dtucker) [regress/agent-ptrace.sh] Skip ptrace test on OSF1/DUnix/Tru64 too; patch from cmadams at hiwaay.net. --- ChangeLog | 4 +++- regress/agent-ptrace.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 882a52abb..887a6c2ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,8 @@ files ending in .exe that aren't binaries; patch from vinschen at redhat.com. - (dtucker) [Makefile.in] Get regress/Makefile symlink right for out-of-tree builds too, from vinschen at redhat.com. + - (dtucker) [regress/agent-ptrace.sh] Skip ptrace test on OSF1/DUnix/Tru64 + too; patch from cmadams at hiwaay.net. 20040828 - (dtucker) [openbsd-compat/mktemp.c] Remove superfluous Cygwin #ifdef; from @@ -1701,4 +1703,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.3533 2004/08/29 09:52:32 dtucker Exp $ +$Id: ChangeLog,v 1.3534 2004/08/29 10:33:07 dtucker Exp $ diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh index bd79d7cb8..9aff167c1 100644 --- a/regress/agent-ptrace.sh +++ b/regress/agent-ptrace.sh @@ -5,7 +5,7 @@ tid="disallow agent ptrace attach" if have_prog uname ; then case `uname` in - AIX|CYGWIN*) + AIX|CYGWIN*|OSF1) echo "skipped (not supported on this platform)" exit 0 ;; -- cgit v1.2.3 From 476b7ecfe4947864b22fa23ed86edd0e62faf98d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 30 Aug 2004 21:13:49 +1000 Subject: - (dtucker) [regress/Makefile] Clean scp-ssh-wrapper.scp too. Patch from vinschen at redhat.com. --- ChangeLog | 4 +++- regress/Makefile | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 0e7cc0cd9..c302eef95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ - (dtucker) [session.c openbsd-compat/bsd-cygwin_util.{c,h}] Bug #915: only copy required environment variables on Cygwin. Patch from vinschen at redhat.com, ok djm@ + - (dtucker) [regress/Makefile] Clean scp-ssh-wrapper.scp too. Patch from + vinschen at redhat.com. 20040829 - (dtucker) [openbsd-compat/getrrsetbyname.c] Prevent getrrsetbyname from @@ -1712,4 +1714,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.3537 2004/08/30 10:42:08 dtucker Exp $ +$Id: ChangeLog,v 1.3538 2004/08/30 11:13:49 dtucker Exp $ diff --git a/regress/Makefile b/regress/Makefile index 9e98e5880..dba6d0bde 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -47,7 +47,7 @@ CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ ls.copy banner.in banner.out empty.in \ - scp-ssh-wrapper.exe \ + scp-ssh-wrapper.scp \ remote_pid #LTESTS += ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp -- cgit v1.2.3 From c0dc1c9bfa127516b8758c1ee1ba3cbd29359ad2 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 6 Dec 2004 22:58:11 +1100 Subject: Resync Ids --- regress/dynamic-forward.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'regress') diff --git a/regress/dynamic-forward.sh b/regress/dynamic-forward.sh index 321fde4cd..4674a7baf 100644 --- a/regress/dynamic-forward.sh +++ b/regress/dynamic-forward.sh @@ -1,4 +1,4 @@ -# $OpenBSD: dynamic-forward.sh,v 1.3 2004/02/28 12:16:57 dtucker Exp $ +# $OpenBSD: dynamic-forward.sh,v 1.4 2004/06/22 22:55:56 dtucker Exp $ # Placed in the Public Domain. tid="dynamic forwarding" -- cgit v1.2.3 From a372960fa9b7a6723910205bf8c05243076ff0ee Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 6 Dec 2004 23:00:27 +1100 Subject: - djm@cvs.openbsd.org 2004/06/26 06:16:07 [reexec.sh] don't change the name of the copied sshd for the reexec fallback test, makes life simpler for portable --- ChangeLog | 7 ++++++- regress/reexec.sh | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 513df22d0..238318846 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,11 @@ [auth-rsa.c auth2-pubkey.c authfile.c misc.c misc.h ssh.h sshd.8] Discard over-length authorized_keys entries rather than complaining when they don't decode. bz #884, with & ok djm@ + - (dtucker) OpenBSD CVS Sync (regress/) + - djm@cvs.openbsd.org 2004/06/26 06:16:07 + [reexec.sh] + don't change the name of the copied sshd for the reexec fallback test, + makes life simpler for portable 20041203 - (dtucker) OpenBSD CVS Sync @@ -1894,4 +1899,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.3590 2004/12/06 11:47:41 dtucker Exp $ +$Id: ChangeLog,v 1.3591 2004/12/06 12:00:27 dtucker Exp $ diff --git a/regress/reexec.sh b/regress/reexec.sh index 39fffefbc..ce3dd86a7 100644 --- a/regress/reexec.sh +++ b/regress/reexec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: reexec.sh,v 1.3 2004/06/25 01:32:44 djm Exp $ +# $OpenBSD: reexec.sh,v 1.4 2004/06/26 06:16:07 djm Exp $ # Placed in the Public Domain. tid="reexec tests" @@ -6,7 +6,7 @@ tid="reexec tests" DATA=/bin/ls COPY=${OBJ}/copy SSHD_ORIG=$SSHD -SSHD_COPY=$OBJ/sshd.copy +SSHD_COPY=$OBJ/sshd # Start a sshd and then delete it start_sshd_copy_zap () -- cgit v1.2.3 From ccf077918587d9f881dd31577e2129d301572b13 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 6 Dec 2004 23:03:27 +1100 Subject: - dtucker@cvs.openbsd.org 2004/07/08 12:59:35 [scp.sh] Regress test for bz #863 (scp double-error), requires $SUDO. ok markus@ --- ChangeLog | 5 ++++- regress/scp.sh | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 238318846..d8b535fcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,9 @@ [reexec.sh] don't change the name of the copied sshd for the reexec fallback test, makes life simpler for portable + - dtucker@cvs.openbsd.org 2004/07/08 12:59:35 + [scp.sh] + Regress test for bz #863 (scp double-error), requires $SUDO. ok markus@ 20041203 - (dtucker) OpenBSD CVS Sync @@ -1899,4 +1902,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.3591 2004/12/06 12:00:27 dtucker Exp $ +$Id: ChangeLog,v 1.3592 2004/12/06 12:03:27 dtucker Exp $ diff --git a/regress/scp.sh b/regress/scp.sh index 6b5664283..39e8af4c6 100644 --- a/regress/scp.sh +++ b/regress/scp.sh @@ -1,4 +1,4 @@ -# $OpenBSD: scp.sh,v 1.2 2004/06/16 13:15:09 dtucker Exp $ +# $OpenBSD: scp.sh,v 1.3 2004/07/08 12:59:35 dtucker Exp $ # Placed in the Public Domain. tid="scp" @@ -64,6 +64,19 @@ cp ${DATA} ${DIR}/copy $SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed" diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy" +if [ ! -z "$SUDO" ]; then + verbose "$tid: skipped file after scp -p with failed chown+utimes" + scpclean + cp -p ${DATA} ${DIR}/copy + cp -p ${DATA} ${DIR}/copy2 + cp ${DATA} ${DIR2}/copy + chmod 660 ${DIR2}/copy + $SUDO chown root ${DIR2}/copy + $SCP -p $scpopts somehost:${DIR}/\* ${DIR2} >/dev/null 2>&1 + diff -rN ${DIR} ${DIR2} || fail "corrupted copy" + $SUDO rm ${DIR2}/copy +fi + for i in 0 1 2 3 4; do verbose "$tid: disallow bad server #$i" SCPTESTMODE=badserver_$i -- cgit v1.2.3 From 3206e57e935870eb9a00a8aef3f3f1e70295b88d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 6 Dec 2004 23:04:57 +1100 Subject: - david@cvs.openbsd.org 2004/07/09 19:45:43 [Makefile] add a missing CLEANFILES used in the re-exec test --- ChangeLog | 5 ++++- regress/Makefile | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index d8b535fcb..2ac3b4330 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,9 @@ - dtucker@cvs.openbsd.org 2004/07/08 12:59:35 [scp.sh] Regress test for bz #863 (scp double-error), requires $SUDO. ok markus@ + - david@cvs.openbsd.org 2004/07/09 19:45:43 + [Makefile] + add a missing CLEANFILES used in the re-exec test 20041203 - (dtucker) OpenBSD CVS Sync @@ -1902,4 +1905,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.3592 2004/12/06 12:03:27 dtucker Exp $ +$Id: ChangeLog,v 1.3593 2004/12/06 12:04:57 dtucker Exp $ diff --git a/regress/Makefile b/regress/Makefile index dba6d0bde..dc7b6e35a 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.31 2004/06/24 19:32:00 djm Exp $ +# $OpenBSD: Makefile,v 1.32 2004/07/09 19:45:43 david Exp $ REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec tests: $(REGRESS_TARGETS) @@ -43,7 +43,7 @@ LTESTS= connect \ USER!= id -un CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ authorized_keys_${USER} known_hosts pidfile \ - ssh_config ssh_proxy sshd_config sshd_proxy \ + ssh_config sshd_config.orig ssh_proxy sshd_config sshd_proxy \ rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ ls.copy banner.in banner.out empty.in \ -- cgit v1.2.3 From 71b5643598d301a1a03c4845ff0eb159998a5fcf Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 6 Dec 2004 23:05:52 +1100 Subject: - djm@cvs.openbsd.org 2004/10/08 02:01:50 [reexec.sh] shrink and tidy; ok dtucker@ --- ChangeLog | 5 +++- regress/reexec.sh | 71 ++++++++++++++++++++++--------------------------------- 2 files changed, 32 insertions(+), 44 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 2ac3b4330..34a8e81fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,6 +32,9 @@ - david@cvs.openbsd.org 2004/07/09 19:45:43 [Makefile] add a missing CLEANFILES used in the re-exec test + - djm@cvs.openbsd.org 2004/10/08 02:01:50 + [reexec.sh] + shrink and tidy; ok dtucker@ 20041203 - (dtucker) OpenBSD CVS Sync @@ -1905,4 +1908,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.3593 2004/12/06 12:04:57 dtucker Exp $ +$Id: ChangeLog,v 1.3594 2004/12/06 12:05:52 dtucker Exp $ diff --git a/regress/reexec.sh b/regress/reexec.sh index ce3dd86a7..d69b8c577 100644 --- a/regress/reexec.sh +++ b/regress/reexec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: reexec.sh,v 1.4 2004/06/26 06:16:07 djm Exp $ +# $OpenBSD: reexec.sh,v 1.5 2004/10/08 02:01:50 djm Exp $ # Placed in the Public Domain. tid="reexec tests" @@ -9,33 +9,37 @@ SSHD_ORIG=$SSHD SSHD_COPY=$OBJ/sshd # Start a sshd and then delete it -start_sshd_copy_zap () +start_sshd_copy () { cp $SSHD_ORIG $SSHD_COPY SSHD=$SSHD_COPY start_sshd - rm -f $SSHD_COPY SSHD=$SSHD_ORIG } +# Do basic copy tests +copy_tests () +{ + rm -f ${COPY} + for p in 1 2; do + verbose "$tid: proto $p" + ${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \ + cat ${DATA} > ${COPY} + if [ $? -ne 0 ]; then + fail "ssh cat $DATA failed" + fi + cmp ${DATA} ${COPY} || fail "corrupted copy" + rm -f ${COPY} + done +} + verbose "test config passing" -cp $OBJ/sshd_config $OBJ/sshd_config.orig +cp $OBJ/sshd_config $OBJ/sshd_config.orig start_sshd - echo "InvalidXXX=no" >> $OBJ/sshd_config -rm -f ${COPY} -for p in 1 2; do - verbose "$tid: proto $p" - ${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \ - cat ${DATA} > ${COPY} - if [ $? -ne 0 ]; then - fail "ssh cat $DATA failed" - fi - cmp ${DATA} ${COPY} || fail "corrupted copy" - rm -f ${COPY} -done +copy_tests $SUDO kill `cat $PIDFILE` rm -f $PIDFILE @@ -44,19 +48,10 @@ cp $OBJ/sshd_config.orig $OBJ/sshd_config verbose "test reexec fallback" -start_sshd_copy_zap - -rm -f ${COPY} -for p in 1 2; do - verbose "$tid: proto $p" - ${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \ - cat ${DATA} > ${COPY} - if [ $? -ne 0 ]; then - fail "ssh cat $DATA failed" - fi - cmp ${DATA} ${COPY} || fail "corrupted copy" - rm -f ${COPY} -done +start_sshd_copy +rm -f $SSHD_COPY + +copy_tests $SUDO kill `cat $PIDFILE` rm -f $PIDFILE @@ -66,22 +61,12 @@ verbose "test reexec fallback without privsep" cp $OBJ/sshd_config.orig $OBJ/sshd_config echo "UsePrivilegeSeparation=no" >> $OBJ/sshd_config -start_sshd_copy_zap - -rm -f ${COPY} -for p in 1 2; do - verbose "$tid: proto $p" - ${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \ - cat ${DATA} > ${COPY} - if [ $? -ne 0 ]; then - fail "ssh cat $DATA failed" - fi - cmp ${DATA} ${COPY} || fail "corrupted copy" - rm -f ${COPY} -done +start_sshd_copy +rm -f $SSHD_COPY + +copy_tests $SUDO kill `cat $PIDFILE` rm -f $PIDFILE -cp $OBJ/sshd_config.orig $OBJ/sshd_config -- cgit v1.2.3 From 124f58ecba39525af88e0619105656d383e515ff Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 6 Dec 2004 23:07:37 +1100 Subject: - djm@cvs.openbsd.org 2004/10/29 23:59:22 [Makefile added brokenkeys.sh] regression test for handling of corrupt keys in authorized_keys file --- ChangeLog | 5 ++++- regress/Makefile | 5 +++-- regress/brokenkeys.sh | 23 +++++++++++++++++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 regress/brokenkeys.sh (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 34a8e81fe..5c0c14803 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,9 @@ - djm@cvs.openbsd.org 2004/10/08 02:01:50 [reexec.sh] shrink and tidy; ok dtucker@ + - djm@cvs.openbsd.org 2004/10/29 23:59:22 + [Makefile added brokenkeys.sh] + regression test for handling of corrupt keys in authorized_keys file 20041203 - (dtucker) OpenBSD CVS Sync @@ -1908,4 +1911,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.3594 2004/12/06 12:05:52 dtucker Exp $ +$Id: ChangeLog,v 1.3595 2004/12/06 12:07:37 dtucker Exp $ diff --git a/regress/Makefile b/regress/Makefile index dc7b6e35a..3e22d547f 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.32 2004/07/09 19:45:43 david Exp $ +# $OpenBSD: Makefile,v 1.33 2004/10/29 23:59:22 djm Exp $ REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec tests: $(REGRESS_TARGETS) @@ -38,7 +38,8 @@ LTESTS= connect \ dynamic-forward \ forwarding \ multiplex \ - reexec + reexec \ + brokenkeys USER!= id -un CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ diff --git a/regress/brokenkeys.sh b/regress/brokenkeys.sh new file mode 100644 index 000000000..3e70c348a --- /dev/null +++ b/regress/brokenkeys.sh @@ -0,0 +1,23 @@ +# $OpenBSD: brokenkeys.sh,v 1.1 2004/10/29 23:59:22 djm Exp $ +# Placed in the Public Domain. + +tid="broken keys" + +KEYS="$OBJ/authorized_keys_${USER}" + +start_sshd + +mv ${KEYS} ${KEYS}.bak + +# Truncated key +echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEABTM= bad key" > $KEYS +cat ${KEYS}.bak >> ${KEYS} +cat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER + +${SSH} -2 -F $OBJ/ssh_config somehost true +if [ $? -ne 0 ]; then + fail "ssh connect with protocol $p failed" +fi + +mv ${KEYS}.bak ${KEYS} + -- cgit v1.2.3 From 79ec66e980ff830b8503dc4bde9c022b23c7825c Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 6 Dec 2004 23:12:15 +1100 Subject: - djm@cvs.openbsd.org 2004/11/07 00:32:41 [multiplex.sh] regression tests for new multiplex commands --- ChangeLog | 5 ++++- regress/multiplex.sh | 23 ++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 5c0c14803..ad4a56966 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,9 @@ - djm@cvs.openbsd.org 2004/10/29 23:59:22 [Makefile added brokenkeys.sh] regression test for handling of corrupt keys in authorized_keys file + - djm@cvs.openbsd.org 2004/11/07 00:32:41 + [multiplex.sh] + regression tests for new multiplex commands 20041203 - (dtucker) OpenBSD CVS Sync @@ -1911,4 +1914,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.3595 2004/12/06 12:07:37 dtucker Exp $ +$Id: ChangeLog,v 1.3596 2004/12/06 12:12:15 dtucker Exp $ diff --git a/regress/multiplex.sh b/regress/multiplex.sh index c0adf109f..15e518c86 100644 --- a/regress/multiplex.sh +++ b/regress/multiplex.sh @@ -1,4 +1,4 @@ -# $OpenBSD: multiplex.sh,v 1.8 2004/06/22 03:12:13 markus Exp $ +# $OpenBSD: multiplex.sh,v 1.9 2004/11/07 00:32:41 djm Exp $ # Placed in the Public Domain. CTL=$OBJ/ctl-sock @@ -17,7 +17,11 @@ COPY=$OBJ/ls.copy start_sshd trace "start master, fork to background" -${SSH} -2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" -f somehost sleep 120 +${SSH} -Nn2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" somehost & +MASTER_PID=$! + +# Wait for master to start and authenticate +sleep 5 verbose "test $tid: envpass" trace "env passing over multiplexed connection" @@ -75,6 +79,15 @@ for s in 0 1 4 5 44; do fi done -# kill master, remove control socket. ssh -MS will exit when sleep exits -$SUDO kill `cat $PIDFILE` -rm -f $CTL +trace "test check command" +${SSH} -S $CTL -Ocheck otherhost || fail "check command failed" + +trace "test exit command" +${SSH} -S $CTL -Oexit otherhost || fail "send exit command failed" + +# Wait for master to exit +sleep 2 + +ps -p $MASTER_PID >/dev/null && fail "exit command failed" + +cleanup -- cgit v1.2.3 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@ --- ChangeLog | 5 ++++- regress/test-exec.sh | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index ad4a56966..85591f0b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,9 @@ - djm@cvs.openbsd.org 2004/11/07 00:32:41 [multiplex.sh] regression tests for new multiplex commands + - dtucker@cvs.openbsd.org 2004/11/25 09:39:27 + [test-exec.sh] + Remove obsolete RhostsAuthentication from test config; ok markus@ 20041203 - (dtucker) OpenBSD CVS Sync @@ -1914,4 +1917,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.3596 2004/12/06 12:12:15 dtucker Exp $ +$Id: ChangeLog,v 1.3597 2004/12/06 12:13:50 dtucker Exp $ 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') 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 641b34c72b8509283b04c7f78e1ef88f25b8cb9b Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Tue, 7 Dec 2004 11:26:15 +1100 Subject: - (dtucker) [regress/scp.sh] Use portable-friendly $DIFFOPTs in new test. --- ChangeLog | 5 ++++- regress/scp.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 162890ec5..d2a382e9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +20041207 + - (dtucker) [regress/scp.sh] Use portable-friendly $DIFFOPTs in new test. + 20041206 - (dtucker) [TODO WARNING.RNG] Update to reflect current reality. ok djm@ - (dtucker) OpenBSD CVS Sync @@ -1920,4 +1923,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.3598 2004/12/06 12:16:29 dtucker Exp $ +$Id: ChangeLog,v 1.3599 2004/12/07 00:26:15 dtucker Exp $ diff --git a/regress/scp.sh b/regress/scp.sh index 39e8af4c6..c3034b6e7 100644 --- a/regress/scp.sh +++ b/regress/scp.sh @@ -73,7 +73,7 @@ if [ ! -z "$SUDO" ]; then chmod 660 ${DIR2}/copy $SUDO chown root ${DIR2}/copy $SCP -p $scpopts somehost:${DIR}/\* ${DIR2} >/dev/null 2>&1 - diff -rN ${DIR} ${DIR2} || fail "corrupted copy" + diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy" $SUDO rm ${DIR2}/copy fi -- cgit v1.2.3 From 5caa78b1b7f086329b2102821a1e09512740dd61 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 20 Dec 2004 12:35:42 +1100 Subject: - (dtucker) [regress/rekey.sh] Touch datafile before filling with dd, since on some wacky platforms (eg old AIXes), dd will refuse to create an output file if it doesn't exist. --- ChangeLog | 5 ++++- regress/rekey.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index c6cf7b386..797ff28bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ prngd is not running. Note that if you have prngd running when OpenSSH is built, OpenSSL will consider itself internally seeded and rand-helper won't be built at all unless explicitly enabled via --with-rand-helper. ok djm@ + - (dtucker) [regress/rekey.sh] Touch datafile before filling with dd, since + on some wacky platforms (eg old AIXes), dd will refuse to create an output + file if it doesn't exist. 20041213 - (dtucker) [contrib/findssh.sh] Clean up on interrupt; from @@ -1957,4 +1960,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.3605 2004/12/20 01:05:08 dtucker Exp $ +$Id: ChangeLog,v 1.3606 2004/12/20 01:35:42 dtucker Exp $ diff --git a/regress/rekey.sh b/regress/rekey.sh index 6b7e845ec..3c5f266fc 100644 --- a/regress/rekey.sh +++ b/regress/rekey.sh @@ -8,6 +8,7 @@ COPY=${OBJ}/copy LOG=${OBJ}/log rm -f ${COPY} ${LOG} ${DATA} +touch ${DATA} dd if=/bin/ls${EXEEXT} of=${DATA} bs=1k seek=511 count=1 > /dev/null 2>&1 for s in 16 1k 128k 256k; do -- 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') 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 f8f3016f9e959e5f1220ccdcd8f5d1c48b6bdb25 Mon Sep 17 00:00:00 2001 From: Tim Rice Date: Wed, 2 Mar 2005 21:49:56 -0800 Subject: - (tim) [regress/agent-ptrace.sh] add another possible gdb error. --- ChangeLog | 3 ++- regress/agent-ptrace.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index d7e4fba19..416a4ea99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -46,6 +46,7 @@ [ssh.1] bz#987: mention ForwardX11Trusted in ssh.1, reported by andrew.benham AT thus.net; ok deraadt@ + - (tim) [regress/agent-ptrace.sh] add another possible gdb error. 20050301 - (djm) OpenBSD CVS sync: @@ -2265,4 +2266,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.3687 2005/03/02 02:22:30 djm Exp $ +$Id: ChangeLog,v 1.3688 2005/03/03 05:49:56 tim Exp $ diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh index 9aff167c1..4de2638e4 100644 --- a/regress/agent-ptrace.sh +++ b/regress/agent-ptrace.sh @@ -41,7 +41,7 @@ EOF if [ $? -ne 0 ]; then fail "gdb failed: exit code $?" fi - egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace attach: Permission denied.' >/dev/null ${OBJ}/gdb.out + egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace attach: Permission denied.|procfs:.*: Invalid argument.' >/dev/null ${OBJ}/gdb.out r=$? rm -f ${OBJ}/gdb.out if [ $r -ne 0 ]; then -- cgit v1.2.3 From 1c56ef6ac3c7818e5c71dd1f62a9473f340be9f2 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 7 Mar 2005 17:36:18 +1100 Subject: - (dtucker) OpenBSD CVS Sync (regress/) - fgsch@cvs.openbsd.org 2004/12/10 01:31:30 [Makefile] some globbing regress; prompted and ok djm@ --- ChangeLog | 6 +++++- regress/Makefile | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 389954232..d7682c033 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ 20050307 - (dtucker) [configure.ac] Disable gettext search when configuring with BSM audit support for the time being. ok djm@ + - (dtucker) OpenBSD CVS Sync (regress/) + - fgsch@cvs.openbsd.org 2004/12/10 01:31:30 + [Makefile] + some globbing regress; prompted and ok djm@ 20050306 - (dtucker) [monitor.c] Bug #125 comment #47: fix errors returned by monitor @@ -2287,4 +2291,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.3694 2005/03/07 06:34:45 dtucker Exp $ +$Id: ChangeLog,v 1.3695 2005/03/07 06:36:18 dtucker Exp $ diff --git a/regress/Makefile b/regress/Makefile index 3e22d547f..0536ee7b9 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.33 2004/10/29 23:59:22 djm Exp $ +# $OpenBSD: Makefile,v 1.34 2004/12/10 01:31:30 fgsch Exp $ REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec tests: $(REGRESS_TARGETS) @@ -34,6 +34,7 @@ LTESTS= connect \ sftp-cmds \ sftp-badcmds \ sftp-batch \ + sftp-glob \ reconfigure \ dynamic-forward \ forwarding \ -- cgit v1.2.3 From 68f7213a2cb1fa846d8eab215f1cde35e2abc20b Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 7 Mar 2005 18:25:53 +1100 Subject: - fgsch@cvs.openbsd.org 2004/12/10 01:31:30 [Makefile sftp-glob.sh] some globbing regress; prompted and ok djm@ --- ChangeLog | 4 ++-- regress/sftp-glob.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 regress/sftp-glob.sh (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index d7682c033..1949e264d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,7 @@ BSM audit support for the time being. ok djm@ - (dtucker) OpenBSD CVS Sync (regress/) - fgsch@cvs.openbsd.org 2004/12/10 01:31:30 - [Makefile] + [Makefile sftp-glob.sh] some globbing regress; prompted and ok djm@ 20050306 @@ -2291,4 +2291,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.3695 2005/03/07 06:36:18 dtucker Exp $ +$Id: ChangeLog,v 1.3696 2005/03/07 07:25:53 dtucker Exp $ diff --git a/regress/sftp-glob.sh b/regress/sftp-glob.sh new file mode 100644 index 000000000..e238356a2 --- /dev/null +++ b/regress/sftp-glob.sh @@ -0,0 +1,28 @@ +# $OpenBSD: sftp-glob.sh,v 1.1 2004/12/10 01:31:30 fgsch Exp $ +# Placed in the Public Domain. + +tid="sftp glob" + +BASE=${OBJ}/glob +DIR=${BASE}/dir +DATA=${DIR}/file + +rm -rf ${BASE} +mkdir -p ${DIR} +touch ${DATA} + +verbose "$tid: ls file" +echo "ls -l ${DIR}/fil*" | ${SFTP} -P ${SFTPSERVER} 2>/dev/null | \ + grep ${DATA} >/dev/null 2>&1 +if [ $? -ne 0 ]; then + fail "globbed ls file failed" +fi + +verbose "$tid: ls dir" +echo "ls -l ${BASE}/d*" | ${SFTP} -P ${SFTPSERVER} 2>/dev/null | \ + grep file >/dev/null 2>&1 +if [ $? -ne 0 ]; then + fail "globbed ls dir failed" +fi + +rm -rf ${BASE} -- 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') 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') 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 894823ec69fbf5249c2d181e74cf42e392c623c3 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 7 Mar 2005 18:34:04 +1100 Subject: - djm@cvs.openbsd.org 2005/02/27 23:13:36 [login-timeout.sh] avoid nameservice lookups in regress test; ok dtucker@ --- ChangeLog | 5 ++++- regress/login-timeout.sh | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 1771d0da1..4b481a18b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,9 @@ [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 + - djm@cvs.openbsd.org 2005/02/27 23:13:36 + [login-timeout.sh] + avoid nameservice lookups in regress test; ok dtucker@ 20050306 - (dtucker) [monitor.c] Bug #125 comment #47: fix errors returned by monitor @@ -2298,4 +2301,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.3698 2005/03/07 07:33:02 dtucker Exp $ +$Id: ChangeLog,v 1.3699 2005/03/07 07:34:04 dtucker Exp $ diff --git a/regress/login-timeout.sh b/regress/login-timeout.sh index ce6edade5..15a887f74 100644 --- a/regress/login-timeout.sh +++ b/regress/login-timeout.sh @@ -1,4 +1,4 @@ -# $OpenBSD: login-timeout.sh,v 1.3 2004/03/08 10:17:12 dtucker Exp $ +# $OpenBSD: login-timeout.sh,v 1.4 2005/02/27 23:13:36 djm Exp $ # Placed in the Public Domain. tid="connect after login grace timeout" @@ -8,7 +8,7 @@ echo "LoginGraceTime 10s" >> $OBJ/sshd_config echo "MaxStartups 1" >> $OBJ/sshd_config start_sshd -(echo SSH-2.0-fake; sleep 60) | telnet localhost ${PORT} >/dev/null 2>&1 & +(echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 & sleep 15 ${SSH} -F $OBJ/ssh_config somehost true if [ $? -ne 0 ]; then @@ -21,7 +21,7 @@ trace "test login grace without privsep" echo "UsePrivilegeSeparation no" >> $OBJ/sshd_config start_sshd -(echo SSH-2.0-fake; sleep 60) | telnet localhost ${PORT} >/dev/null 2>&1 & +(echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 & sleep 15 ${SSH} -F $OBJ/ssh_config somehost true if [ $? -ne 0 ]; then -- cgit v1.2.3 From 5d909f077336318267d4089f41c7deb5e4b6c64d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 7 Mar 2005 18:35:34 +1100 Subject: - djm@cvs.openbsd.org 2005/03/04 08:48:46 [Makefile envpass.sh] regress test for SendEnv config parsing bug; ok dtucker@ --- ChangeLog | 5 ++++- regress/Makefile | 4 ++-- regress/envpass.sh | 21 +++++++++++++++------ 3 files changed, 21 insertions(+), 9 deletions(-) (limited to 'regress') diff --git a/ChangeLog b/ChangeLog index 4b481a18b..1c02ab321 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,9 @@ - djm@cvs.openbsd.org 2005/02/27 23:13:36 [login-timeout.sh] avoid nameservice lookups in regress test; ok dtucker@ + - djm@cvs.openbsd.org 2005/03/04 08:48:46 + [Makefile envpass.sh] + regress test for SendEnv config parsing bug; ok dtucker@ 20050306 - (dtucker) [monitor.c] Bug #125 comment #47: fix errors returned by monitor @@ -2301,4 +2304,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.3699 2005/03/07 07:34:04 dtucker Exp $ +$Id: ChangeLog,v 1.3700 2005/03/07 07:35:34 dtucker Exp $ diff --git a/regress/Makefile b/regress/Makefile index eee1f3bf2..4f47bc3fd 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.35 2005/01/14 04:21:18 david Exp $ +# $OpenBSD: Makefile,v 1.36 2005/03/04 08:48:46 djm Exp $ REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec tests: $(REGRESS_TARGETS) @@ -49,7 +49,7 @@ CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ ls.copy banner.in banner.out empty.in \ - scp-ssh-wrapper.scp \ + scp-ssh-wrapper.scp ssh_proxy_envpass \ remote_pid #LTESTS += ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp diff --git a/regress/envpass.sh b/regress/envpass.sh index 5a7e178d8..af7eafe3d 100644 --- a/regress/envpass.sh +++ b/regress/envpass.sh @@ -1,13 +1,20 @@ -# $OpenBSD: envpass.sh,v 1.3 2004/06/22 22:42:02 dtucker Exp $ +# $OpenBSD: envpass.sh,v 1.4 2005/03/04 08:48:46 djm Exp $ # Placed in the Public Domain. tid="environment passing" # NB accepted env vars are in test-exec.sh (_XXX_TEST_* and _XXX_TEST) +# Prepare a custom config to test for a configuration parsing bug fixed in 4.0 +cat << EOF > $OBJ/ssh_proxy_envpass +Host test-sendenv-confparse-bug + SendEnv * +EOF +cat $OBJ/ssh_proxy >> $OBJ/ssh_proxy_envpass + trace "pass env, don't accept" verbose "test $tid: pass env, don't accept" -_TEST_ENV=blah ${SSH} -oSendEnv="*" -F $OBJ/ssh_proxy otherhost \ +_TEST_ENV=blah ${SSH} -oSendEnv="*" -F $OBJ/ssh_proxy_envpass otherhost \ sh << 'EOF' test -z "$_TEST_ENV" EOF @@ -18,7 +25,7 @@ fi trace "don't pass env, accept" verbose "test $tid: don't pass env, accept" -${SSH} -F $OBJ/ssh_proxy otherhost \ +_XXX_TEST_A=1 _XXX_TEST_B=2 ${SSH} -F $OBJ/ssh_proxy_envpass otherhost \ sh << 'EOF' test -z "$_XXX_TEST_A" && test -z "$_XXX_TEST_B" EOF @@ -29,8 +36,8 @@ fi trace "pass single env, accept single env" verbose "test $tid: pass single env, accept single env" -_XXX_TEST=blah ${SSH} -oSendEnv="_XXX_TEST" -F $OBJ/ssh_proxy otherhost \ - sh << 'EOF' +_XXX_TEST=blah ${SSH} -oSendEnv="_XXX_TEST" -F $OBJ/ssh_proxy_envpass \ + otherhost sh << 'EOF' test X"$_XXX_TEST" = X"blah" EOF r=$? @@ -41,7 +48,7 @@ fi trace "pass multiple env, accept multiple env" verbose "test $tid: pass multiple env, accept multiple env" _XXX_TEST_A=1 _XXX_TEST_B=2 ${SSH} -oSendEnv="_XXX_TEST_*" \ - -F $OBJ/ssh_proxy otherhost \ + -F $OBJ/ssh_proxy_envpass otherhost \ sh << 'EOF' test X"$_XXX_TEST_A" = X"1" -a X"$_XXX_TEST_B" = X"2" EOF @@ -49,3 +56,5 @@ r=$? if [ $r -ne 0 ]; then fail "environment not found" fi + +rm -f $OBJ/ssh_proxy_envpass -- 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') 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') 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