~ubuntu-branches/ubuntu/lucid/openssh/lucid

« back to all changes in this revision

Viewing changes to regress/putty-transfer.sh

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-09-30 23:09:58 UTC
  • mfrom: (1.13.3 upstream) (29 hardy)
  • mto: This revision was merged to the branch mainline in revision 43.
  • Revision ID: james.westby@ubuntu.com-20080930230958-o6vsgn8c4mm959s0
Tags: 1:5.1p1-3
* Remove unnecessary ssh-vulnkey output in non-verbose mode when no
  compromised or unknown keys were found (closes: #496495).
* Configure with --disable-strip; dh_strip will deal with stripping
  binaries and will honour DEB_BUILD_OPTIONS (thanks, Bernhard R. Link;
  closes: #498681).
* Fix handling of zero-length server banners (thanks, Tomas Mraz; closes:
  #497026).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#       $OpenBSD: putty-transfer.sh,v 1.2 2008/06/30 10:31:11 djm Exp $
 
2
#       Placed in the Public Domain.
 
3
 
 
4
tid="putty transfer data"
 
5
 
 
6
DATA=/bin/ls
 
7
COPY=${OBJ}/copy
 
8
 
 
9
if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
 
10
        fatal "putty interop tests not enabled"
 
11
fi
 
12
 
 
13
# XXX support protocol 1 too
 
14
for p in 2; do
 
15
        for c in 0 1 ; do 
 
16
        verbose "$tid: proto $p compression $c"
 
17
                rm -f ${COPY}
 
18
                cp ${OBJ}/.putty/sessions/localhost_proxy \
 
19
                    ${OBJ}/.putty/sessions/compression_$c
 
20
                echo "Compression=$c" >> ${OBJ}/.putty/sessions/kex_$k
 
21
                env HOME=$PWD ${PLINK} -load compression_$c -batch \
 
22
                    -i putty.rsa$p 127.0.0.1 cat ${DATA} > ${COPY}
 
23
                if [ $? -ne 0 ]; then
 
24
                        fail "ssh cat $DATA failed"
 
25
                fi
 
26
                cmp ${DATA} ${COPY}             || fail "corrupted copy"
 
27
        
 
28
                for s in 10 100 1k 32k 64k 128k 256k; do
 
29
                        trace "proto $p compression $c dd-size ${s}"
 
30
                        rm -f ${COPY}
 
31
                        dd if=$DATA obs=${s} 2> /dev/null | \
 
32
                                env HOME=$PWD ${PLINK} -load compression_$c \
 
33
                                    -batch -i putty.rsa$p 127.0.0.1 \
 
34
                                    "cat > ${COPY}"
 
35
                        if [ $? -ne 0 ]; then
 
36
                                fail "ssh cat $DATA failed"
 
37
                        fi
 
38
                        cmp $DATA ${COPY}       || fail "corrupted copy"
 
39
                done
 
40
        done
 
41
done
 
42
rm -f ${COPY}
 
43