=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sftp.c,v retrieving revision 1.29.2.3 retrieving revision 1.30 diff -u -r1.29.2.3 -r1.30 --- src/usr.bin/ssh/sftp.c 2003/04/03 22:35:17 1.29.2.3 +++ src/usr.bin/ssh/sftp.c 2002/06/23 09:30:14 1.30 @@ -24,7 +24,7 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.29.2.3 2003/04/03 22:35:17 miod Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.30 2002/06/23 09:30:14 deraadt Exp $"); /* XXX: short-form remote directory listings (like 'ls -C') */ @@ -43,8 +43,6 @@ size_t copy_buffer_len = 32768; size_t num_requests = 16; -extern int showprogress; - static void connect_to_server(char *path, char **args, int *in, int *out, pid_t *sshpid) { @@ -104,7 +102,7 @@ int main(int argc, char **argv) { - int in, out, ch, err; + int in, out, ch; pid_t sshpid; char *host, *userhost, *cp, *file2; int debug_level = 0, sshver = 2; @@ -117,6 +115,7 @@ args.list = NULL; addargs(&args, "ssh"); /* overwritten with ssh_program */ + addargs(&args, "-oFallBackToRsh no"); addargs(&args, "-oForwardX11 no"); addargs(&args, "-oForwardAgent no"); addargs(&args, "-oClearAllForwardings yes"); @@ -157,7 +156,6 @@ fatal("%s (%s).", strerror(errno), optarg); } else fatal("Filename already specified."); - showprogress = 0; break; case 'P': sftp_direct = optarg; @@ -193,7 +191,7 @@ file1 = cp; } - if ((host = strrchr(userhost, '@')) == NULL) + if ((host = strchr(userhost, '@')) == NULL) host = userhost; else { *host++ = '\0'; @@ -233,7 +231,7 @@ &sshpid); } - err = interactive_loop(in, out, file1, file2); + interactive_loop(in, out, file1, file2); close(in); close(out); @@ -245,5 +243,5 @@ fatal("Couldn't wait for ssh process: %s", strerror(errno)); - exit(err == 0 ? 0 : 1); + exit(0); }