diff options
author | mouring <mouring@cvs.openbsd.org> | 2001-04-16 02:31:53 +0000 |
---|---|---|
committer | mouring <mouring@cvs.openbsd.org> | 2001-04-16 02:31:53 +0000 |
commit | 2dc2b43f3974a910f9df6154a2ac22b194bcc3a0 (patch) | |
tree | c866b7e68d6c2ca87ee43018d54292c364f92721 /usr.bin/ssh/sftp.c | |
parent | 8f075c205d047d44e4fec3ac5048875a291f8070 (diff) |
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 'usr.bin/ssh/sftp.c')
-rw-r--r-- | usr.bin/ssh/sftp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index cd90ebd3221..2c57bef0207 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -24,10 +24,9 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.14 2001/04/12 23:17:54 mouring Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.15 2001/04/16 02:31:44 mouring Exp $"); /* XXX: commandline mode */ -/* XXX: copy between two remote hosts (commandline) */ /* XXX: short-form remote directory listings (like 'ls -C') */ #include "buffer.h" @@ -40,6 +39,8 @@ RCSID("$OpenBSD: sftp.c,v 1.14 2001/04/12 23:17:54 mouring Exp $"); #include "sftp-client.h" #include "sftp-int.h" +#include "scp-common.h" + int use_ssh1 = 0; char *ssh_program = _PATH_SSH_PROGRAM; char *sftp_server = NULL; @@ -202,7 +203,7 @@ main(int argc, char **argv) userhost = xstrdup(argv[optind]); file2 = argv[optind+1]; - if ((cp = strchr(userhost, ':')) != NULL) { + if ((cp = colon(userhost)) != NULL) { *cp++ = '\0'; file1 = cp; } @@ -219,6 +220,7 @@ main(int argc, char **argv) make_ssh_args(userhost); } + host = cleanhostname(host); if (!*host) { fprintf(stderr, "Missing hostname\n"); usage(); |