Mailing List Archive

[Bug 3431] scp truncates file when copying file over itself
https://bugzilla.mindrot.org/show_bug.cgi?id=3431

Damien Miller <djm@mindrot.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Blocks| |3418
Resolution|--- |FIXED
Status|NEW |RESOLVED

--- Comment #3 from Damien Miller <djm@mindrot.org> ---
This fix has been committed and will be in OpenSSH 9.1, due in a few
months.

commit 56a0697fe079ff3e1ba30a2d5c26b5e45f7b71f8 (HEAD -> master,
origin/master, origin/HEAD)
Author: djm@openbsd.org <djm@openbsd.org>
Date: Fri May 13 06:31:50 2022 +0000

upstream: arrange for scp, when in sftp mode, to not ftruncate(3)
files

early

previous behavious of unconditionally truncating the destination
file
would cause "scp ~/foo localhost:" and "scp localhost:foo ~/" to
delete all the contents of their destination.

spotted by solene@ sthen@, also bz3431; ok dtucker@

OpenBSD-Commit-ID: ca39fdd39e0ec1466b9666f15cbcfddea6aaa179


Referenced Bugs:

https://bugzilla.mindrot.org/show_bug.cgi?id=3418
[Bug 3418] tracking bug for openssh-9.1
--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs