summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-07-08 23:14:25 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-07-08 23:14:25 +1000
commitbf7a29b64f7c4edcce514525851f371141f888f1 (patch)
tree75ae7e788dbb6ad86224b6e97260e78b6889a709
parent6609de6d11b271b243c4f70e00d17f7f7d60ff8a (diff)
- dtucker@cvs.openbsd.org 2004/07/08 12:47:21
[scp.c] Prevent scp from skipping the file following a double-error. bz #863, ok markus@
-rw-r--r--ChangeLog9
-rw-r--r--scp.c12
2 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 8394cfef..1d7a5d6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+20040708
+ - (dtucker) OpenBSD CVS Sync
+ - dtucker@cvs.openbsd.org 2004/07/08 12:47:21
+ [scp.c]
+ Prevent scp from skipping the file following a double-error.
+ bz #863, ok markus@
+
20040623
- (dtucker) [auth1.c] Ensure do_pam_account is called for Protocol 1
connections with empty passwords. Patch from davidwu at nbttech.com,
@@ -1004,4 +1011,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.3316.2.6 2004/06/22 23:17:03 dtucker Exp $
+$Id: ChangeLog,v 1.3316.2.7 2004/07/08 13:14:25 dtucker Exp $
diff --git a/scp.c b/scp.c
index 1daa2ccf..ff18671c 100644
--- a/scp.c
+++ b/scp.c
@@ -938,21 +938,25 @@ bad: run_err("%s: %s", np, strerror(errno));
if (pflag) {
if (exists || omode != mode)
#ifdef HAVE_FCHMOD
- if (fchmod(ofd, omode))
+ if (fchmod(ofd, omode)) {
#else /* HAVE_FCHMOD */
- if (chmod(np, omode))
+ if (chmod(np, omode)) {
#endif /* HAVE_FCHMOD */
run_err("%s: set mode: %s",
np, strerror(errno));
+ wrerr = DISPLAYED;
+ }
} else {
if (!exists && omode != mode)
#ifdef HAVE_FCHMOD
- if (fchmod(ofd, omode & ~mask))
+ if (fchmod(ofd, omode & ~mask)) {
#else /* HAVE_FCHMOD */
- if (chmod(np, omode & ~mask))
+ if (chmod(np, omode & ~mask)) {
#endif /* HAVE_FCHMOD */
run_err("%s: set mode: %s",
np, strerror(errno));
+ wrerr = DISPLAYED;
+ }
}
if (close(ofd) == -1) {
wrerr = YES;