diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | scp.c | 6 |
2 files changed, 7 insertions, 5 deletions
@@ -12,6 +12,10 @@ | |||
12 | [session.c] | 12 | [session.c] |
13 | Disable X11 forwarding if xauth binary is not found. Patch from Nalin | 13 | Disable X11 forwarding if xauth binary is not found. Patch from Nalin |
14 | Dahyabhai <nalin@redhat.com>; ok markus@ | 14 | Dahyabhai <nalin@redhat.com>; ok markus@ |
15 | - markus@cvs.openbsd.org 2001/05/19 16:05:41 | ||
16 | [scp.c] | ||
17 | ftruncate() instead of open()+O_TRUNC like rcp.c does | ||
18 | allows scp /path/to/file localhost:/path/to/file | ||
15 | 19 | ||
16 | 20010528 | 20 | 20010528 |
17 | - (tim) [conifgure.in] add setvbuf test needed for sftp-int.c | 21 | - (tim) [conifgure.in] add setvbuf test needed for sftp-int.c |
@@ -5442,4 +5446,4 @@ | |||
5442 | - Wrote replacements for strlcpy and mkdtemp | 5446 | - Wrote replacements for strlcpy and mkdtemp |
5443 | - Released 1.0pre1 | 5447 | - Released 1.0pre1 |
5444 | 5448 | ||
5445 | $Id: ChangeLog,v 1.1229 2001/06/05 19:29:20 mouring Exp $ | 5449 | $Id: ChangeLog,v 1.1230 2001/06/05 19:31:41 mouring Exp $ |
@@ -75,7 +75,7 @@ | |||
75 | */ | 75 | */ |
76 | 76 | ||
77 | #include "includes.h" | 77 | #include "includes.h" |
78 | RCSID("$OpenBSD: scp.c,v 1.70 2001/05/08 19:45:24 mouring Exp $"); | 78 | RCSID("$OpenBSD: scp.c,v 1.71 2001/05/19 16:05:41 markus Exp $"); |
79 | 79 | ||
80 | #include "xmalloc.h" | 80 | #include "xmalloc.h" |
81 | #include "atomicio.h" | 81 | #include "atomicio.h" |
@@ -804,7 +804,7 @@ sink(argc, argv) | |||
804 | } | 804 | } |
805 | omode = mode; | 805 | omode = mode; |
806 | mode |= S_IWRITE; | 806 | mode |= S_IWRITE; |
807 | if ((ofd = open(np, O_WRONLY | O_CREAT | O_TRUNC, mode)) < 0) { | 807 | if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { |
808 | bad: run_err("%s: %s", np, strerror(errno)); | 808 | bad: run_err("%s: %s", np, strerror(errno)); |
809 | continue; | 809 | continue; |
810 | } | 810 | } |
@@ -859,12 +859,10 @@ bad: run_err("%s: %s", np, strerror(errno)); | |||
859 | wrerr = YES; | 859 | wrerr = YES; |
860 | wrerrno = j >= 0 ? EIO : errno; | 860 | wrerrno = j >= 0 ? EIO : errno; |
861 | } | 861 | } |
862 | #if 0 | ||
863 | if (ftruncate(ofd, size)) { | 862 | if (ftruncate(ofd, size)) { |
864 | run_err("%s: truncate: %s", np, strerror(errno)); | 863 | run_err("%s: truncate: %s", np, strerror(errno)); |
865 | wrerr = DISPLAYED; | 864 | wrerr = DISPLAYED; |
866 | } | 865 | } |
867 | #endif | ||
868 | if (pflag) { | 866 | if (pflag) { |
869 | if (exists || omode != mode) | 867 | if (exists || omode != mode) |
870 | #ifdef HAVE_FCHMOD | 868 | #ifdef HAVE_FCHMOD |