Thanks, Alexander.
Ok. Here's a last try at running diff. It's not the intention to spam
the list while getting used to cvs and diff again, and reading up on
style(9) .
I've kept the changes to the minimum that are needed to illustrate the -l
option which was there in the body of the code, but missing from the
options and case statement.
/Lars
Index: sftp.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/sftp.c,v
retrieving revision 1.111
diff -u -p -r1.111 sftp.c
--- sftp.c 18 Aug 2009 18:36:21 -0000 1.111
+++ sftp.c 19 Nov 2009 15:57:10 -0000
@@ -1662,7 +1662,7 @@ main(int argc, char **argv)
infile = stdin;
while ((ch = getopt(argc, argv,
- "1246hqrvCc:D:i:o:s:S:b:B:F:P:R:")) != -1) {
+ "1246hqrvCc:D:i:o:s:S:b:B:F:P:R:l:")) != -1) {
switch (ch) {
/* Passed through to ssh(1) */
case '4':
@@ -1721,6 +1721,9 @@ main(int argc, char **argv)
break;
case 'D':
sftp_direct = optarg;
+ break;
+ case 'l':
+ addargs(&args, "-l %s", optarg);
break;
case 'r':
global_rflag = 1;
Index: sftp.1
===================================================================
RCS file: /cvs/src/usr.bin/ssh/sftp.1,v
retrieving revision 1.78
diff -u -p -r1.78 sftp.1
--- sftp.1 28 Oct 2009 21:45:08 -0000 1.78
+++ sftp.1 19 Nov 2009 15:57:10 -0000
@@ -38,6 +38,7 @@
.Op Fl D Ar sftp_server_path
.Op Fl F Ar ssh_config
.Op Fl i Ar identity_file
+.Op Fl l Ar login_name
.Op Fl o Ar ssh_option
.Op Fl P Ar port
.Op Fl R Ar num_requests
@@ -157,6 +158,10 @@ Selects the file from which the identity
authentication is read.
This option is directly passed to
.Xr ssh 1 .
+.It Fl l Ar login_name
+Specifies the user to log in as on the remote machine. This also may
+be specified on a per-host basis in the configuration file.
+
.It Fl o Ar ssh_option
Can be used to pass options to
.Nm ssh