scp: Problem when source and destination are identical

Florian Weimer Florian.Weimer at RUS.Uni-Stuttgart.DE
Fri May 18 18:00:51 EST 2001


Markus Friedl <markus.friedl at informatik.uni-erlangen.de> writes:

> On Thu, May 17, 2001 at 04:54:27PM +0200, Florian Weimer wrote:
> > If the source and destination file are identical, the receiving scp
> > truncates the file.  On the sending end, read() returns 0, and garbage
> > is sent instead of actual data, and the receiving end puts it into the
> > file, which at least confuses the users.
> 
> how should rcp/scp know that the files are identical?

I don't ask that scp refuses to shred the file (although this would be
nice) because I know that this can't be implemented in a reliable
manner.  However, the problem I see is the garbage, which confuses
users quite a lot.

-- 
Florian Weimer 	                  Florian.Weimer at RUS.Uni-Stuttgart.DE
University of Stuttgart           http://cert.uni-stuttgart.de/
RUS-CERT                          +49-711-685-5973/fax +49-711-685-5898



More information about the openssh-unix-dev mailing list