diff options
author | Colin Watson <cjwatson@debian.org> | 2013-09-14 23:42:11 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-09-14 23:42:11 +0100 |
commit | 327155e6824b3ee13837bdde04e4eb47e147ff46 (patch) | |
tree | 8f8743122403c7a2e6ed919156711fb1520c657f /regress/forwarding.sh | |
parent | 0334ce32304e9ba2a10ee5ca49ca6e8ff3ba6cf4 (diff) | |
parent | 74e339b8f8936bc0d985e053a076d0c9b5e9ea51 (diff) |
* New upstream release (http://www.openssh.com/txt/release-6.3).
- sftp(1): add support for resuming partial downloads using the "reget"
command and on the sftp commandline or on the "get" commandline using
the "-a" (append) option (closes: #158590).
- ssh(1): add an "IgnoreUnknown" configuration option to selectively
suppress errors arising from unknown configuration directives (closes:
#436052).
- sftp(1): update progressmeter when data is acknowledged, not when it's
sent (partially addresses #708372).
- ssh(1): do not fatally exit when attempting to cleanup multiplexing-
created channels that are incompletely opened (closes: #651357).
Diffstat (limited to 'regress/forwarding.sh')
-rw-r--r-- | regress/forwarding.sh | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/regress/forwarding.sh b/regress/forwarding.sh index f9c367beb..94873f22c 100644 --- a/regress/forwarding.sh +++ b/regress/forwarding.sh | |||
@@ -1,7 +1,8 @@ | |||
1 | # $OpenBSD: forwarding.sh,v 1.8 2012/06/01 00:47:35 djm Exp $ | 1 | # $OpenBSD: forwarding.sh,v 1.11 2013/06/10 21:56:43 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="local and remote forwarding" | 4 | tid="local and remote forwarding" |
5 | |||
5 | DATA=/bin/ls${EXEEXT} | 6 | DATA=/bin/ls${EXEEXT} |
6 | 7 | ||
7 | start_sshd | 8 | start_sshd |
@@ -26,9 +27,9 @@ for p in 1 2; do | |||
26 | 27 | ||
27 | trace "transfer over forwarded channels and check result" | 28 | trace "transfer over forwarded channels and check result" |
28 | ${SSH} -$q -F $OBJ/ssh_config -p$last -o 'ConnectionAttempts=4' \ | 29 | ${SSH} -$q -F $OBJ/ssh_config -p$last -o 'ConnectionAttempts=4' \ |
29 | somehost cat $DATA > $OBJ/ls.copy | 30 | somehost cat ${DATA} > ${COPY} |
30 | test -f $OBJ/ls.copy || fail "failed copy $DATA" | 31 | test -f ${COPY} || fail "failed copy of ${DATA}" |
31 | cmp $DATA $OBJ/ls.copy || fail "corrupted copy of $DATA" | 32 | cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" |
32 | 33 | ||
33 | sleep 10 | 34 | sleep 10 |
34 | done | 35 | done |
@@ -75,7 +76,7 @@ for p in 1 2; do | |||
75 | else | 76 | else |
76 | # this one should fail | 77 | # this one should fail |
77 | ${SSH} -$p -F $OBJ/ssh_config -p ${base}01 true \ | 78 | ${SSH} -$p -F $OBJ/ssh_config -p ${base}01 true \ |
78 | 2>>$TEST_SSH_LOGFILE && \ | 79 | >>$TEST_REGRESS_LOGFILE 2>&1 && \ |
79 | fail "local forwarding not cleared" | 80 | fail "local forwarding not cleared" |
80 | fi | 81 | fi |
81 | sleep 10 | 82 | sleep 10 |
@@ -88,7 +89,7 @@ for p in 1 2; do | |||
88 | else | 89 | else |
89 | # this one should fail | 90 | # this one should fail |
90 | ${SSH} -$p -F $OBJ/ssh_config -p ${base}01 true \ | 91 | ${SSH} -$p -F $OBJ/ssh_config -p ${base}01 true \ |
91 | 2>>$TEST_SSH_LOGFILE && \ | 92 | >>$TEST_REGRESS_LOGFILE 2>&1 && \ |
92 | fail "remote forwarding not cleared" | 93 | fail "remote forwarding not cleared" |
93 | fi | 94 | fi |
94 | sleep 10 | 95 | sleep 10 |
@@ -103,3 +104,18 @@ for p in 2; do | |||
103 | fail "stdio forwarding proto $p" | 104 | fail "stdio forwarding proto $p" |
104 | fi | 105 | fi |
105 | done | 106 | done |
107 | |||
108 | echo "LocalForward ${base}01 127.0.0.1:$PORT" >> $OBJ/ssh_config | ||
109 | echo "RemoteForward ${base}02 127.0.0.1:${base}01" >> $OBJ/ssh_config | ||
110 | for p in 1 2; do | ||
111 | trace "config file: start forwarding, fork to background" | ||
112 | ${SSH} -$p -F $OBJ/ssh_config -f somehost sleep 10 | ||
113 | |||
114 | trace "config file: transfer over forwarded channels and check result" | ||
115 | ${SSH} -F $OBJ/ssh_config -p${base}02 -o 'ConnectionAttempts=4' \ | ||
116 | somehost cat ${DATA} > ${COPY} | ||
117 | test -f ${COPY} || fail "failed copy of ${DATA}" | ||
118 | cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" | ||
119 | |||
120 | wait | ||
121 | done | ||