View | Details | Raw Unified | Return to bug 742 | Differences between
and this patch

Collapse All | Expand All

(-)sftp.c (-2 / +3 lines)
Lines 124-130 main(int argc, char **argv) Link Here
124
{
124
{
125
	int in, out, ch, err;
125
	int in, out, ch, err;
126
	char *host, *userhost, *cp, *file2;
126
	char *host, *userhost, *cp, *file2;
127
	int debug_level = 0, sshver = 2;
127
	int debug_level = 0, sshver = 0;
128
	char *file1 = NULL, *sftp_server = NULL;
128
	char *file1 = NULL, *sftp_server = NULL;
129
	char *ssh_program = _PATH_SSH_PROGRAM, *sftp_direct = NULL;
129
	char *ssh_program = _PATH_SSH_PROGRAM, *sftp_direct = NULL;
130
	LogLevel ll = SYSLOG_LEVEL_INFO;
130
	LogLevel ll = SYSLOG_LEVEL_INFO;
Lines 228-234 main(int argc, char **argv) Link Here
228
			usage();
228
			usage();
229
		}
229
		}
230
230
231
		addargs(&args, "-oProtocol %d", sshver);
231
		if (sshver != 0)
232
			addargs(&args, "-oProtocol %d", sshver);
232
233
233
		/* no subsystem if the server-spec contains a '/' */
234
		/* no subsystem if the server-spec contains a '/' */
234
		if (sftp_server == NULL || strchr(sftp_server, '/') == NULL)
235
		if (sftp_server == NULL || strchr(sftp_server, '/') == NULL)
(-)regress/banner.sh (-3 / +19 lines)
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

Return to bug 742