summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-10-07 08:23:06 +1100
committerDarren Tucker <dtucker@zip.com.au>2009-10-07 08:23:06 +1100
commit282b4026cb5c5a229e2c5b33e4ad3ac31fcf3189 (patch)
tree182d38eb23823330e04099e81bc2c57f4eac309e
parentadba1ba51474d43e708de2b986c36199fa8f167e (diff)
- djm@cvs.openbsd.org 2009/08/13 01:11:19
[sftp.1 sftp.c] Swizzle options: "-P sftp_server_path" moves to "-D sftp_server_path", add "-P port" to match scp(1). Fortunately, the -P option is only really used by our regression scripts. part of larger patch from carlosvsilvapt@gmail.com for his Google Summer of Code work; ok deraadt markus
-rw-r--r--ChangeLog7
-rw-r--r--sftp.119
-rw-r--r--sftp.c10
3 files changed, 25 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c305d7d6..46f5e9cfa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,13 @@
11 - jmc@cvs.openbsd.org 2009/08/12 06:31:42 11 - jmc@cvs.openbsd.org 2009/08/12 06:31:42
12 [sftp.1] 12 [sftp.1]
13 sort options; 13 sort options;
14 - djm@cvs.openbsd.org 2009/08/13 01:11:19
15 [sftp.1 sftp.c]
16 Swizzle options: "-P sftp_server_path" moves to "-D sftp_server_path",
17 add "-P port" to match scp(1). Fortunately, the -P option is only really
18 used by our regression scripts.
19 part of larger patch from carlosvsilvapt@gmail.com for his Google Summer
20 of Code work; ok deraadt markus
14 21
1520091002 2220091002
16 - (djm) [Makefile.in] Mention readconf.o in ssh-keysign's make deps. 23 - (djm) [Makefile.in] Mention readconf.o in ssh-keysign's make deps.
diff --git a/sftp.1 b/sftp.1
index d47ab1573..6cec52ae1 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp.1,v 1.71 2009/08/12 06:31:42 jmc Exp $ 1.\" $OpenBSD: sftp.1,v 1.72 2009/08/13 01:11:19 djm Exp $
2.\" 2.\"
3.\" Copyright (c) 2001 Damien Miller. All rights reserved. 3.\" Copyright (c) 2001 Damien Miller. All rights reserved.
4.\" 4.\"
@@ -22,7 +22,7 @@
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\" 24.\"
25.Dd $Mdocdate: August 12 2009 $ 25.Dd $Mdocdate: August 13 2009 $
26.Dt SFTP 1 26.Dt SFTP 1
27.Os 27.Os
28.Sh NAME 28.Sh NAME
@@ -35,10 +35,11 @@
35.Op Fl B Ar buffer_size 35.Op Fl B Ar buffer_size
36.Op Fl b Ar batchfile 36.Op Fl b Ar batchfile
37.Op Fl c Ar cipher 37.Op Fl c Ar cipher
38.Op Fl D Ar sftp_server_path
38.Op Fl F Ar ssh_config 39.Op Fl F Ar ssh_config
39.Op Fl i Ar identity_path 40.Op Fl i Ar identity_path
40.Op Fl o Ar ssh_option 41.Op Fl o Ar ssh_option
41.Op Fl P Ar sftp_server_path 42.Op Fl P Ar port
42.Op Fl R Ar num_requests 43.Op Fl R Ar num_requests
43.Op Fl S Ar program 44.Op Fl S Ar program
44.Op Fl s Ar subsystem | sftp_server 45.Op Fl s Ar subsystem | sftp_server
@@ -140,6 +141,11 @@ flag).
140Selects the cipher to use for encrypting the data transfers. 141Selects the cipher to use for encrypting the data transfers.
141This option is directly passed to 142This option is directly passed to
142.Xr ssh 1 . 143.Xr ssh 1 .
144.It Fl D Ar sftp_server_path
145Connect directly to a local sftp server
146(rather than via
147.Xr ssh 1 ) .
148This option may be useful in debugging the client and server.
143.It Fl F Ar ssh_config 149.It Fl F Ar ssh_config
144Specifies an alternative 150Specifies an alternative
145per-user configuration file for 151per-user configuration file for
@@ -215,11 +221,8 @@ For full details of the options listed below, and their possible values, see
215.It UserKnownHostsFile 221.It UserKnownHostsFile
216.It VerifyHostKeyDNS 222.It VerifyHostKeyDNS
217.El 223.El
218.It Fl P Ar sftp_server_path 224.It Fl P Ar port
219Connect directly to a local sftp server 225Specifies the port to connect to on the remote host.
220(rather than via
221.Xr ssh 1 ) .
222This option may be useful in debugging the client and server.
223.It Fl q 226.It Fl q
224Quiet mode: disables the progress meter as well as warning and 227Quiet mode: disables the progress meter as well as warning and
225diagnostic messages from 228diagnostic messages from
diff --git a/sftp.c b/sftp.c
index 798a72edb..4c1d55389 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.108 2009/08/12 00:13:00 djm Exp $ */ 1/* $OpenBSD: sftp.c,v 1.109 2009/08/13 01:11:19 djm 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 *
@@ -1707,7 +1707,8 @@ main(int argc, char **argv)
1707 ll = SYSLOG_LEVEL_INFO; 1707 ll = SYSLOG_LEVEL_INFO;
1708 infile = stdin; 1708 infile = stdin;
1709 1709
1710 while ((ch = getopt(argc, argv, "1246hqvCc:i:o:s:S:b:B:F:P:R:")) != -1) { 1710 while ((ch = getopt(argc, argv,
1711 "1246hqvCc:D:i:o:s:S:b:B:F:P:R:")) != -1) {
1711 switch (ch) { 1712 switch (ch) {
1712 /* Passed through to ssh(1) */ 1713 /* Passed through to ssh(1) */
1713 case '4': 1714 case '4':
@@ -1726,6 +1727,9 @@ main(int argc, char **argv)
1726 showprogress = 0; 1727 showprogress = 0;
1727 addargs(&args, "-%c", ch); 1728 addargs(&args, "-%c", ch);
1728 break; 1729 break;
1730 case 'P':
1731 addargs(&args, "-oPort %s", optarg);
1732 break;
1729 case 'v': 1733 case 'v':
1730 if (debug_level < 3) { 1734 if (debug_level < 3) {
1731 addargs(&args, "-v"); 1735 addargs(&args, "-v");
@@ -1758,7 +1762,7 @@ main(int argc, char **argv)
1758 batchmode = 1; 1762 batchmode = 1;
1759 addargs(&args, "-obatchmode yes"); 1763 addargs(&args, "-obatchmode yes");
1760 break; 1764 break;
1761 case 'P': 1765 case 'D':
1762 sftp_direct = optarg; 1766 sftp_direct = optarg;
1763 break; 1767 break;
1764 case 'R': 1768 case 'R':