summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2007-02-19 22:14:11 +1100
committerDarren Tucker <dtucker@zip.com.au>2007-02-19 22:14:11 +1100
commit6ec2fbec8b8b0e774d1d32afd26d0d13a2d1e4b7 (patch)
treee962563f8c9d6125eb44949e9d3d446fef9c0acc /scp.c
parent0aa3dbb5088fc8c3ca722d901fd8db55a781546b (diff)
- djm@cvs.openbsd.org 2007/01/22 13:06:21
[scp.c] fix detection of whether we should show progress meter or not: scp tested isatty(stderr) but wrote the progress meter to stdout. This patch makes it test stdout. bz#1265 reported by junkmail AT bitsculpture.com; of dtucker@
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scp.c b/scp.c
index 56a3e79ff..a52aaeb12 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: scp.c,v 1.155 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: scp.c,v 1.156 2007/01/22 13:06:21 djm Exp $ */
2/* 2/*
3 * scp - secure remote copy. This is basically patched BSD rcp which 3 * scp - secure remote copy. This is basically patched BSD rcp which
4 * uses ssh to do the data transfer (instead of using rcmd). 4 * uses ssh to do the data transfer (instead of using rcmd).
@@ -380,7 +380,7 @@ main(int argc, char **argv)
380 if ((pwd = getpwuid(userid = getuid())) == NULL) 380 if ((pwd = getpwuid(userid = getuid())) == NULL)
381 fatal("unknown user %u", (u_int) userid); 381 fatal("unknown user %u", (u_int) userid);
382 382
383 if (!isatty(STDERR_FILENO)) 383 if (!isatty(STDOUT_FILENO))
384 showprogress = 0; 384 showprogress = 0;
385 385
386 remin = STDIN_FILENO; 386 remin = STDIN_FILENO;