summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-04-16 18:26:41 +1000
committerDamien Miller <djm@mindrot.org>2001-04-16 18:26:41 +1000
commit21134b5b09ad480a2283f1b63c0c1e3a68515274 (patch)
tree30267755775b3bebba8b8fe0bc627f1e95924c7b /sftp.c
parentb5cdc6643848d170156770821ce946dae0d3f844 (diff)
- (djm) OpenBSD CVS Sync
- mouring@cvs.openbsd.org 2001/04/16 02:31:44 [scp.c sftp.c] IPv6 support for sftp (which I bungled in my last patch) which is borrowed from scp.c. Thanks to Markus@ for pointing it out.
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sftp.c b/sftp.c
index 911a04f24..8c887fbcf 100644
--- a/sftp.c
+++ b/sftp.c
@@ -24,10 +24,9 @@
24 24
25#include "includes.h" 25#include "includes.h"
26 26
27RCSID("$OpenBSD: sftp.c,v 1.14 2001/04/12 23:17:54 mouring Exp $"); 27RCSID("$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;
46char *__progname; 45char *__progname;
47#endif 46#endif
48 47
48#include "scp-common.h"
49
49int use_ssh1 = 0; 50int use_ssh1 = 0;
50char *ssh_program = _PATH_SSH_PROGRAM; 51char *ssh_program = _PATH_SSH_PROGRAM;
51char *sftp_server = NULL; 52char *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();