mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-28 00:04:30 +02:00
- djm@cvs.openbsd.org 2007/06/13 00:21:27
[scp.c] don't ftruncate() non-regular files; bz#1236 reported by wood AT xmission.com; ok dtucker@
This commit is contained in:
parent
7dae3d296e
commit
067263e848
@ -1,3 +1,10 @@
|
|||||||
|
20070625
|
||||||
|
- (dtucker) OpenBSD CVS Sync
|
||||||
|
- djm@cvs.openbsd.org 2007/06/13 00:21:27
|
||||||
|
[scp.c]
|
||||||
|
don't ftruncate() non-regular files; bz#1236 reported by wood AT
|
||||||
|
xmission.com; ok dtucker@
|
||||||
|
|
||||||
20070614
|
20070614
|
||||||
- (dtucker) [cipher-ctr.c umac.c openbsd-compat/openssl-compat.h] Move the
|
- (dtucker) [cipher-ctr.c umac.c openbsd-compat/openssl-compat.h] Move the
|
||||||
USE_BUILTIN_RIJNDAEL compat goop to openssl-compat.h so it can be
|
USE_BUILTIN_RIJNDAEL compat goop to openssl-compat.h so it can be
|
||||||
@ -3072,4 +3079,4 @@
|
|||||||
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
||||||
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.4702 2007/06/14 13:47:31 dtucker Exp $
|
$Id: ChangeLog,v 1.4703 2007/06/25 08:32:33 dtucker Exp $
|
||||||
|
5
scp.c
5
scp.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: scp.c,v 1.158 2007/06/12 13:54:28 dtucker Exp $ */
|
/* $OpenBSD: scp.c,v 1.159 2007/06/13 00:21:27 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* scp - secure remote copy. This is basically patched BSD rcp which
|
* scp - secure remote copy. This is basically patched BSD rcp which
|
||||||
* uses ssh to do the data transfer (instead of using rcmd).
|
* uses ssh to do the data transfer (instead of using rcmd).
|
||||||
@ -1024,7 +1024,8 @@ bad: run_err("%s: %s", np, strerror(errno));
|
|||||||
wrerr = YES;
|
wrerr = YES;
|
||||||
wrerrno = errno;
|
wrerrno = errno;
|
||||||
}
|
}
|
||||||
if (wrerr == NO && ftruncate(ofd, size) != 0) {
|
if (wrerr == NO && (!exists || S_ISREG(stb.st_mode)) &&
|
||||||
|
ftruncate(ofd, size) != 0) {
|
||||||
run_err("%s: truncate: %s", np, strerror(errno));
|
run_err("%s: truncate: %s", np, strerror(errno));
|
||||||
wrerr = DISPLAYED;
|
wrerr = DISPLAYED;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user