- djm@cvs.openbsd.org 2004/04/27 09:47:30
[regress/Makefile regress/test-exec.sh, added regress/envpass.sh] regress test for environment passing, SendEnv & AcceptEnv options; ok markus@
This commit is contained in:
parent
a7ea546f1b
commit
4c37ef08ab
|
@ -1,6 +1,12 @@
|
||||||
20040616
|
20040616
|
||||||
- (dtucker) [openbsd-compat/port-aix.c] Expand whitespace -> tabs. No
|
- (dtucker) [openbsd-compat/port-aix.c] Expand whitespace -> tabs. No
|
||||||
code changes.
|
code changes.
|
||||||
|
- (dtucker) OpenBSD CVS Sync regress/
|
||||||
|
- djm@cvs.openbsd.org 2004/04/27 09:47:30
|
||||||
|
[Makefile test-exec.sh]
|
||||||
|
regress test for environment passing, SendEnv & AcceptEnv options;
|
||||||
|
ok markus@
|
||||||
|
|
||||||
|
|
||||||
20040615
|
20040615
|
||||||
- (djm) OpenBSD CVS Sync
|
- (djm) OpenBSD CVS Sync
|
||||||
|
@ -1226,4 +1232,4 @@
|
||||||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.3388 2004/06/16 02:01:15 dtucker Exp $
|
$Id: ChangeLog,v 1.3389 2004/06/16 10:08:56 dtucker Exp $
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
# $OpenBSD: envpass.sh,v 1.1 2004/04/27 09:47:30 djm Exp $
|
||||||
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
|
tid="environment passing"
|
||||||
|
|
||||||
|
# NB accepted env vars are in test-exec.sh (_XXX_TEST_* and _XXX_TEST)
|
||||||
|
|
||||||
|
trace "pass env, don't accept"
|
||||||
|
verbose "test $tid: pass env, don't accept"
|
||||||
|
_TEST_ENV=blah ${SSH} -oSendEnv="*" -F $OBJ/ssh_proxy otherhost \
|
||||||
|
'[ -z "$_TEST_ENV" ]'
|
||||||
|
r=$?
|
||||||
|
if [ $r -ne 0 ]; then
|
||||||
|
fail "environment found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
trace "don't pass env, accept"
|
||||||
|
verbose "test $tid: don't pass env, accept"
|
||||||
|
${SSH} -F $OBJ/ssh_proxy otherhost \
|
||||||
|
'[ -z "$_XXX_TEST_A" -a -z "$_XXX_TEST_B" ]'
|
||||||
|
r=$?
|
||||||
|
if [ $r -ne 0 ]; then
|
||||||
|
fail "environment found"
|
||||||
|
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 \
|
||||||
|
'[ "x$_XXX_TEST" = "xblah" ]'
|
||||||
|
r=$?
|
||||||
|
if [ $r -ne 0 ]; then
|
||||||
|
fail "environment not found"
|
||||||
|
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 \
|
||||||
|
'[ "x$_XXX_TEST_A" = "x1" -a "x$_XXX_TEST_B" = "x2" ]'
|
||||||
|
r=$?
|
||||||
|
if [ $r -ne 0 ]; then
|
||||||
|
fail "environment not found"
|
||||||
|
fi
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: Makefile,v 1.27 2004/02/17 08:23:20 dtucker Exp $
|
# $OpenBSD: Makefile,v 1.28 2004/04/27 09:47:30 djm Exp $
|
||||||
|
|
||||||
REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec
|
REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec
|
||||||
tests: $(REGRESS_TARGETS)
|
tests: $(REGRESS_TARGETS)
|
||||||
|
@ -13,6 +13,7 @@ LTESTS= connect \
|
||||||
proto-version \
|
proto-version \
|
||||||
proto-mismatch \
|
proto-mismatch \
|
||||||
exit-status \
|
exit-status \
|
||||||
|
envpass \
|
||||||
transfer \
|
transfer \
|
||||||
banner \
|
banner \
|
||||||
rekey \
|
rekey \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: test-exec.sh,v 1.15 2004/02/24 16:56:30 markus Exp $
|
# $OpenBSD: test-exec.sh,v 1.16 2004/04/27 09:47:30 djm Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
PORT=4242
|
PORT=4242
|
||||||
|
@ -162,6 +162,8 @@ cat << EOF > $OBJ/sshd_config
|
||||||
PidFile $PIDFILE
|
PidFile $PIDFILE
|
||||||
AuthorizedKeysFile $OBJ/authorized_keys_%u
|
AuthorizedKeysFile $OBJ/authorized_keys_%u
|
||||||
LogLevel QUIET
|
LogLevel QUIET
|
||||||
|
AcceptEnv _XXX_TEST_*
|
||||||
|
AcceptEnv _XXX_TEST
|
||||||
StrictModes no
|
StrictModes no
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue