[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#607267: /usr/bin/scp: fails to notice close() errors

Hi Michal,

On Mon, Dec 05, 2011 at 12:41:21AM +0100, Michal Suchanek wrote:
> Excerpts from Helmut Grohne's message of Sat Dec 03 17:33:04 +0100 2011:
> > Hi,
> > 
> > On Sun, Jan 02, 2011 at 03:48:05PM +0100, Michal Suchanek wrote:
> > > This same issue also happens with cp(1) from coreutils.
> > 
> > I verified that this statement is wrong.
> It is not.

This probably depends on the point of view. From the current context it
is not clear what "this issue" is.

> Please read the analysis in the latter message.

I think we should split this up in two issues:

1) Not checking the return value of close().

This is a very real bug in openssh, but not in coreutils (seem my

2) Not fsyncing the files before closeing them.

It is not the job of cp nor scp to guarantee that any file has reached
the disk. So this "bug" will not be fixed. If it was their job, tools
like sync(1) would not exist in the first place. If it was, you could
file this bug report against every single package handling files in the
archive (except for a handful). Since that would be insane, I simply
dropped this request in my previous reply. I should have made this more

Can we now ignore 2) and concentrate on 1)?

> > A quick grep of the openssh source indicates that checking close is
> > overrated. Who needs errors anyway? I want that it works!!1!eleven
> And for it to work it needs to report errors when they happen.

I guess I should have used explicit irony tags here.

Unfortunately fixing ssh will not be a small patch. It might be best to
simply document the issue in man 1 scp.


Reply to: