diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2007-10-29 06:57:14 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2007-10-29 06:57:14 +0000 |
commit | 9d87c840a35bf2ebb1c43df9ea5197c02ccc6b3a (patch) | |
tree | 567160d73ed3df1319cfd15f5ffbc9f54d215e62 /regress/usr.bin/ssh | |
parent | 907d77124a4ca89b0536cb9eb523824da032cb6d (diff) |
Add simple regress test for LocalCommand; ok djm@
Diffstat (limited to 'regress/usr.bin/ssh')
-rw-r--r-- | regress/usr.bin/ssh/Makefile | 3 | ||||
-rw-r--r-- | regress/usr.bin/ssh/localcommand.sh | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/Makefile b/regress/usr.bin/ssh/Makefile index d9492289c0e..113443dd5e7 100644 --- a/regress/usr.bin/ssh/Makefile +++ b/regress/usr.bin/ssh/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.42 2006/07/19 13:34:52 dtucker Exp $ +# $OpenBSD: Makefile,v 1.43 2007/10/29 06:57:13 dtucker Exp $ REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 @@ -39,6 +39,7 @@ LTESTS= connect \ reexec \ brokenkeys \ cfgmatch \ + localcommand \ forcecommand USER!= id -un diff --git a/regress/usr.bin/ssh/localcommand.sh b/regress/usr.bin/ssh/localcommand.sh new file mode 100644 index 00000000000..a23e5c6788e --- /dev/null +++ b/regress/usr.bin/ssh/localcommand.sh @@ -0,0 +1,15 @@ +# $OpenBSD: localcommand.sh,v 1.1 2007/10/29 06:57:13 dtucker Exp $ +# Placed in the Public Domain. + +tid="localcommand" + +echo 'PermitLocalCommand yes' >> $OBJ/ssh_proxy +echo 'LocalCommand echo foo' >> $OBJ/ssh_proxy + +for p in 1 2; do + verbose "test $tid: proto $p localcommand" + a=$(${SSH} -F $OBJ/ssh_proxy -$p somehost true) + if [ "$a" != "foo" ] ; then + fail "$tid proto $p" + fi +done |