summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sftp.c b/sftp.c
index ff14d3c29..fc809dc6e 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.197 2020/01/23 07:10:22 dtucker Exp $ */ 1/* $OpenBSD: sftp.c,v 1.198 2020/02/26 11:46:51 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -2377,7 +2377,7 @@ main(int argc, char **argv)
2377{ 2377{
2378 int in, out, ch, err, tmp, port = -1; 2378 int in, out, ch, err, tmp, port = -1;
2379 char *host = NULL, *user, *cp, *file2 = NULL; 2379 char *host = NULL, *user, *cp, *file2 = NULL;
2380 int debug_level = 0, sshver = 2; 2380 int debug_level = 0;
2381 char *file1 = NULL, *sftp_server = NULL; 2381 char *file1 = NULL, *sftp_server = NULL;
2382 char *ssh_program = _PATH_SSH_PROGRAM, *sftp_direct = NULL; 2382 char *ssh_program = _PATH_SSH_PROGRAM, *sftp_direct = NULL;
2383 const char *errstr; 2383 const char *errstr;
@@ -2445,12 +2445,10 @@ main(int argc, char **argv)
2445 debug_level++; 2445 debug_level++;
2446 break; 2446 break;
2447 case '1': 2447 case '1':
2448 sshver = 1; 2448 fatal("SSH protocol v.1 is no longer supported");
2449 if (sftp_server == NULL)
2450 sftp_server = _PATH_SFTP_SERVER;
2451 break; 2449 break;
2452 case '2': 2450 case '2':
2453 sshver = 2; 2451 /* accept silently */
2454 break; 2452 break;
2455 case 'a': 2453 case 'a':
2456 global_aflag = 1; 2454 global_aflag = 1;
@@ -2555,7 +2553,6 @@ main(int argc, char **argv)
2555 addargs(&args, "-l"); 2553 addargs(&args, "-l");
2556 addargs(&args, "%s", user); 2554 addargs(&args, "%s", user);
2557 } 2555 }
2558 addargs(&args, "-oProtocol %d", sshver);
2559 2556
2560 /* no subsystem if the server-spec contains a '/' */ 2557 /* no subsystem if the server-spec contains a '/' */
2561 if (sftp_server == NULL || strchr(sftp_server, '/') == NULL) 2558 if (sftp_server == NULL || strchr(sftp_server, '/') == NULL)