- 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
diff --git a/sftp.c b/sftp.c
index 798a72e..4c1d553 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 @@
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 @@
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 @@
batchmode = 1;
addargs(&args, "-obatchmode yes");
break;
- case 'P':
+ case 'D':
sftp_direct = optarg;
break;
case 'R':