summaryrefslogtreecommitdiffhomepage
path: root/scp.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2004-08-24 05:05:48 +0000
committerMatt Johnston <matt@ucc.asn.au>2004-08-24 05:05:48 +0000
commit70b7c24cb078df45882711372f7663b4822a02d6 (patch)
treee09ada38c0ec96c72a787303e718f3cdcadb6676 /scp.c
parente089ee4d8508f2f68c4966d4aa9ca65f7176aed8 (diff)
Fix for "-l" scp option
--HG-- extra : convert_revision : 700ba4c9a06b892fa9742bc8f3b6fe73a32f94f7
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scp.c b/scp.c
index b6eec88..e356b8b 100644
--- a/scp.c
+++ b/scp.c
@@ -178,8 +178,10 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc)
close(pout[1]);
args.list[0] = ssh_program;
- if (remuser != NULL)
- addargs(&args, "-l%s", remuser);
+ if (remuser != NULL) {
+ addargs(&args, "-l");
+ addargs(&args, "%s", remuser);
+ }
addargs(&args, "%s", host);
addargs(&args, "%s", cmd);