=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/scp.c,v retrieving revision 1.85.2.3 retrieving revision 1.86 diff -u -r1.85.2.3 -r1.86 --- src/usr.bin/ssh/scp.c 2002/06/22 07:23:17 1.85.2.3 +++ src/usr.bin/ssh/scp.c 2001/12/05 03:56:39 1.86 @@ -75,7 +75,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.85.2.3 2002/06/22 07:23:17 miod Exp $"); +RCSID("$OpenBSD: scp.c,v 1.86 2001/12/05 03:56:39 itojun Exp $"); #include "xmalloc.h" #include "atomicio.h" @@ -219,9 +219,10 @@ extern int optind; args.list = NULL; - addargs(&args, "ssh"); /* overwritten with ssh_program */ + addargs(&args, "ssh"); /* overwritten with ssh_program */ addargs(&args, "-x"); addargs(&args, "-oForwardAgent no"); + addargs(&args, "-oFallBackToRsh no"); addargs(&args, "-oClearAllForwardings yes"); fflag = tflag = 0; @@ -353,7 +354,8 @@ src = colon(argv[i]); if (src) { /* remote to remote */ static char *ssh_options = - "-x -o'ClearAllForwardings yes'"; + "-x -o'FallBackToRsh no' " + "-o'ClearAllForwardings yes'"; *src++ = 0; if (*src == 0) src = "."; @@ -754,7 +756,7 @@ cursize = need; } (void) snprintf(namebuf, need, "%s%s%s", targ, - strcmp(targ, "/") ? "/" : "", cp); + *targ ? "/" : "", cp); np = namebuf; } else np = targ; @@ -929,9 +931,9 @@ usage(void) { (void) fprintf(stderr, - "usage: scp [-pqrvBC46] [-F config] [-S program] [-P port]\n" - " [-c cipher] [-i identity] [-o option]\n" - " [[user@]host1:]file1 [...] [[user@]host2:]file2\n"); + "usage: scp [-pqrvBC46] [-F config] [-S ssh] [-P port] [-c cipher] [-i identity]\n" + " [-o option] f1 f2\n" + " or: scp [options] f1 ... fn directory\n"); exit(1); } @@ -1071,7 +1073,7 @@ off_t cursize, abbrevsize; double elapsed; int ratio, barlength, i, remaining; - char buf[512]; + char buf[256]; if (flag == -1) { (void) gettimeofday(&start, (struct timezone *) 0); @@ -1097,13 +1099,10 @@ i = barlength * ratio / 100; snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "|%.*s%*s|", i, - "*******************************************************" - "*******************************************************" - "*******************************************************" - "*******************************************************" - "*******************************************************" - "*******************************************************" - "*******************************************************", + "***************************************" + "***************************************" + "***************************************" + "***************************************", barlength - i, ""); } i = 0;