https://bugzilla.mindrot.org/show_bug.cgi?id=3504
Dominique Martinet <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmveqfhbronz.anqzf_@noclue. | |notk.org --- Comment #1 from Dominique Martinet <[email protected]> --- A couple of notes: - that might look like a weird usecase (Don't do this!), but this can happen with clustershell copy mode (clush --copy) where it's very easy to send a file to all configured machines with the same path, and if the source machine is included in that list we will run something like this scp command (that's the reason Stephane found that out -- I just think it's better to explain where we come from) - regardless of the localhost case, in case a transfer is interrupted in the middle both the old scp protocol and sftp will leave the target file clobbered. O_TRUNC is objectively better than leaving part of the original content behind here, but a potential better alternative would be to do like rsync and write to a temporary file (rsync uses `.<originalfilename>.<randomchars>`) That file can be removed safely if the connection is interrupted, and the original file would be left untouched. (perhaps it'd be better to ask this not to openssh portable but to the bugs@openbsd list?) Thank you! -- You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ openssh-bugs mailing list [email protected] https://lists.mindrot.org/mailman/listinfo/openssh-bugs
