|
Lines 4-13
Link Here
|
| 4 |
tid="banner" |
4 |
tid="banner" |
| 5 |
echo "Banner $OBJ/banner.in" >> $OBJ/sshd_proxy |
5 |
echo "Banner $OBJ/banner.in" >> $OBJ/sshd_proxy |
| 6 |
|
6 |
|
|
|
7 |
rm -f $OBJ/banner.out $OBJ/banner.in $OBJ/empty.in |
| 8 |
touch $OBJ/empty.in |
| 9 |
|
| 10 |
trace "test missing banner file" |
| 11 |
verbose "test $tid: missing banner file" |
| 12 |
${SSH} -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \ |
| 13 |
if ! cmp $OBJ/empty.in $OBJ/banner.out ; then |
| 14 |
fail "missing banner file" |
| 15 |
fi |
| 16 |
|
| 7 |
for s in 0 10 100 1000 10000 100000 ; do |
17 |
for s in 0 10 100 1000 10000 100000 ; do |
| 8 |
if [ "$s" = "0" ]; then |
18 |
if [ "$s" = "0" ]; then |
| 9 |
# create empty banner |
19 |
# create empty banner |
| 10 |
rm -f $OBJ/banner.in |
|
|
| 11 |
touch $OBJ/banner.in |
20 |
touch $OBJ/banner.in |
| 12 |
elif [ "$s" = "10" ]; then |
21 |
elif [ "$s" = "10" ]; then |
| 13 |
# create 10-byte banner file |
22 |
# create 10-byte banner file |
|
Lines 22-31
for s in 0 10 100 1000 10000 100000 ; do
Link Here
|
| 22 |
|
31 |
|
| 23 |
trace "test banner size $s" |
32 |
trace "test banner size $s" |
| 24 |
verbose "test $tid: size $s" |
33 |
verbose "test $tid: size $s" |
| 25 |
${SSH} -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out |
34 |
${SSH} -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \ |
| 26 |
if ! cmp $OBJ/banner.in $OBJ/banner.out ; then |
35 |
if ! cmp $OBJ/banner.in $OBJ/banner.out ; then |
| 27 |
fail "banner size $s mismatch" |
36 |
fail "banner size $s mismatch" |
| 28 |
fi |
37 |
fi |
| 29 |
done |
38 |
done |
| 30 |
|
39 |
|
| 31 |
rm -f $OBJ/banner.out $OBJ/banner.in |
40 |
trace "test suppress banner (-q)" |
|
|
41 |
verbose "test $tid: suppress banner (-q)" |
| 42 |
${SSH} -q -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \ |
| 43 |
if ! cmp $OBJ/empty.in $OBJ/banner.out ; then |
| 44 |
fail "suppress banner (-q)" |
| 45 |
fi |
| 46 |
|
| 47 |
rm -f $OBJ/banner.out $OBJ/banner.in $OBJ/empty.in |