scp: Problem when source and destination are identical
Wayne Davison
wayne at blorf.net
Sat May 19 05:44:29 EST 2001
On Fri, 18 May 2001, Markus Friedl wrote:
> - if ((ofd = open(np, O_WRONLY | O_CREAT | O_TRUNC, mode)) < 0) {
> + if ((ofd = open(np, O_WRONLY | O_CREAT , mode)) < 0) {
If you do that, you need to uncomment the ftrunctate() call lower down
(or overwriting a larger file with a shorter one will leave spurious
data at the end).
..wayne..
More information about the openssh-unix-dev
mailing list