[Bug 1252] sftp returns 0 when upload is unsuccessful due to a full device

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Mon Jan 22 18:03:38 EST 2007


http://bugzilla.mindrot.org/show_bug.cgi?id=1252


djm at mindrot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1232|                            |ok?
               Flag|                            |




------- Comment #1 from djm at mindrot.org  2007-01-22 18:03 -------
Created an attachment (id=1232)
 --> (http://bugzilla.mindrot.org/attachment.cgi?id=1232&action=view)
propogate error status on upload falure

Thanks for the report. This is a bug in sftp-client.c:do_upload(). The
error status on a write failure was not being returned to the caller.

BTW in interactive mode (the default when sftp is started for a tty),
the return value will be zero anyway because the sftp client exits
normally. A better demonstration is batch mode, where the sftp client's
exit status will reflect the failure of a command:

echo "put /bin/ls /dev/full" | sftp -b - linux-host

(substitute a full filesystem for /dev/full if you don't have Linux)




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the openssh-bugs mailing list