summaryrefslogtreecommitdiffstats
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 7c305d7d..46f5e9cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,13 @@
- jmc@cvs.openbsd.org 2009/08/12 06:31:42
[sftp.1]
sort options;
+ - 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
20091002
- (djm) [Makefile.in] Mention readconf.o in ssh-keysign's make deps.
diff --git a/sftp.1 b/sftp.1
index d47ab157..6cec52ae 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sftp.1,v 1.71 2009/08/12 06:31:42 jmc Exp $
+.\" $OpenBSD: sftp.1,v 1.72 2009/08/13 01:11:19 djm Exp $
.\"
.\" Copyright (c) 2001 Damien Miller. All rights reserved.
.\"
@@ -22,7 +22,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: August 12 2009 $
+.Dd $Mdocdate: August 13 2009 $
.Dt SFTP 1
.Os
.Sh NAME
@@ -35,10 +35,11 @@
.Op Fl B Ar buffer_size
.Op Fl b Ar batchfile
.Op Fl c Ar cipher
+.Op Fl D Ar sftp_server_path
.Op Fl F Ar ssh_config
.Op Fl i Ar identity_path
.Op Fl o Ar ssh_option
-.Op Fl P Ar sftp_server_path
+.Op Fl P Ar port
.Op Fl R Ar num_requests
.Op Fl S Ar program
.Op Fl s Ar subsystem | sftp_server
@@ -140,6 +141,11 @@ flag).
Selects the cipher to use for encrypting the data transfers.
This option is directly passed to
.Xr ssh 1 .
+.It Fl D Ar sftp_server_path
+Connect directly to a local sftp server
+(rather than via
+.Xr ssh 1 ) .
+This option may be useful in debugging the client and server.
.It Fl F Ar ssh_config
Specifies an alternative
per-user configuration file for
@@ -215,11 +221,8 @@ For full details of the options listed below, and their possible values, see
.It UserKnownHostsFile
.It VerifyHostKeyDNS
.El
-.It Fl P Ar sftp_server_path
-Connect directly to a local sftp server
-(rather than via
-.Xr ssh 1 ) .
-This option may be useful in debugging the client and server.
+.It Fl P Ar port
+Specifies the port to connect to on the remote host.
.It Fl q
Quiet mode: disables the progress meter as well as warning and
diagnostic messages from
diff --git a/sftp.c b/sftp.c
index 798a72ed..4c1d5538 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.108 2009/08/12 00:13:00 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.109 2009/08/13 01:11:19 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -1707,7 +1707,8 @@ main(int argc, char **argv)
ll = SYSLOG_LEVEL_INFO;
infile = stdin;
- while ((ch = getopt(argc, argv, "1246hqvCc:i:o:s:S:b:B:F:P:R:")) != -1) {
+ while ((ch = getopt(argc, argv,
+ "1246hqvCc:D:i:o:s:S:b:B:F:P:R:")) != -1) {
switch (ch) {
/* Passed through to ssh(1) */
case '4':
@@ -1726,6 +1727,9 @@ main(int argc, char **argv)
showprogress = 0;
addargs(&args, "-%c", ch);
break;
+ case 'P':
+ addargs(&args, "-oPort %s", optarg);
+ break;
case 'v':
if (debug_level < 3) {
addargs(&args, "-v");
@@ -1758,7 +1762,7 @@ main(int argc, char **argv)
batchmode = 1;
addargs(&args, "-obatchmode yes");
break;
- case 'P':
+ case 'D':
sftp_direct = optarg;
break;
case 'R':