diff options
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -24,10 +24,9 @@ | |||
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | 26 | ||
27 | RCSID("$OpenBSD: sftp.c,v 1.14 2001/04/12 23:17:54 mouring Exp $"); | 27 | RCSID("$OpenBSD: sftp.c,v 1.15 2001/04/16 02:31:44 mouring Exp $"); |
28 | 28 | ||
29 | /* XXX: commandline mode */ | 29 | /* XXX: commandline mode */ |
30 | /* XXX: copy between two remote hosts (commandline) */ | ||
31 | /* XXX: short-form remote directory listings (like 'ls -C') */ | 30 | /* XXX: short-form remote directory listings (like 'ls -C') */ |
32 | 31 | ||
33 | #include "buffer.h" | 32 | #include "buffer.h" |
@@ -46,6 +45,8 @@ extern char *__progname; | |||
46 | char *__progname; | 45 | char *__progname; |
47 | #endif | 46 | #endif |
48 | 47 | ||
48 | #include "scp-common.h" | ||
49 | |||
49 | int use_ssh1 = 0; | 50 | int use_ssh1 = 0; |
50 | char *ssh_program = _PATH_SSH_PROGRAM; | 51 | char *ssh_program = _PATH_SSH_PROGRAM; |
51 | char *sftp_server = NULL; | 52 | char *sftp_server = NULL; |
@@ -209,7 +210,7 @@ main(int argc, char **argv) | |||
209 | userhost = xstrdup(argv[optind]); | 210 | userhost = xstrdup(argv[optind]); |
210 | file2 = argv[optind+1]; | 211 | file2 = argv[optind+1]; |
211 | 212 | ||
212 | if ((cp = strchr(userhost, ':')) != NULL) { | 213 | if ((cp = colon(userhost)) != NULL) { |
213 | *cp++ = '\0'; | 214 | *cp++ = '\0'; |
214 | file1 = cp; | 215 | file1 = cp; |
215 | } | 216 | } |
@@ -226,6 +227,7 @@ main(int argc, char **argv) | |||
226 | make_ssh_args(userhost); | 227 | make_ssh_args(userhost); |
227 | } | 228 | } |
228 | 229 | ||
230 | host = cleanhostname(host); | ||
229 | if (!*host) { | 231 | if (!*host) { |
230 | fprintf(stderr, "Missing hostname\n"); | 232 | fprintf(stderr, "Missing hostname\n"); |
231 | usage(); | 233 | usage(); |