summaryrefslogtreecommitdiff
path: root/regress/banner.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2004-03-01 02:25:32 +0000
committerColin Watson <cjwatson@debian.org>2004-03-01 02:25:32 +0000
commitea8116a11e3de70036dbc665ccb0d486cf89cac9 (patch)
treed73ccdff78d8608e156465af42e6a1b3527fb2d6 /regress/banner.sh
parente39b311381a5609cc05acf298c42fba196dc524b (diff)
parentf5bda272678ec6dccaa5f29379cf60cb855018e8 (diff)
Merge 3.8p1 to the trunk. This builds and runs, but I haven't tested it
extensively yet. ProtocolKeepAlives is now just a compatibility alias for ServerAliveInterval.
Diffstat (limited to 'regress/banner.sh')
-rw-r--r--regress/banner.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/regress/banner.sh b/regress/banner.sh
new file mode 100644
index 000000000..0b9c95007
--- /dev/null
+++ b/regress/banner.sh
@@ -0,0 +1,44 @@
1# $OpenBSD: banner.sh,v 1.2 2003/10/11 11:49:49 dtucker Exp $
2# Placed in the Public Domain.
3
4tid="banner"
5echo "Banner $OBJ/banner.in" >> $OBJ/sshd_proxy
6
7rm -f $OBJ/banner.out $OBJ/banner.in $OBJ/empty.in
8touch $OBJ/empty.in
9
10trace "test missing banner file"
11verbose "test $tid: missing banner file"
12( ${SSH} -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \
13 cmp $OBJ/empty.in $OBJ/banner.out ) || \
14 fail "missing banner file"
15
16for s in 0 10 100 1000 10000 100000 ; do
17 if [ "$s" = "0" ]; then
18 # create empty banner
19 touch $OBJ/banner.in
20 elif [ "$s" = "10" ]; then
21 # create 10-byte banner file
22 echo "abcdefghi" >$OBJ/banner.in
23 else
24 # increase size 10x
25 cp $OBJ/banner.in $OBJ/banner.out
26 for i in 0 1 2 3 4 5 6 7 8 ; do
27 cat $OBJ/banner.out >> $OBJ/banner.in
28 done
29 fi
30
31 trace "test banner size $s"
32 verbose "test $tid: size $s"
33 ( ${SSH} -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \
34 cmp $OBJ/banner.in $OBJ/banner.out ) || \
35 fail "banner size $s mismatch"
36done
37
38trace "test suppress banner (-q)"
39verbose "test $tid: suppress banner (-q)"
40( ${SSH} -q -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \
41 cmp $OBJ/empty.in $OBJ/banner.out ) || \
42 fail "suppress banner (-q)"
43
44rm -f $OBJ/banner.out $OBJ/banner.in $OBJ/empty.in