From 0aa3dbb5088fc8c3ca722d901fd8db55a781546b Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 19 Feb 2007 22:13:39 +1100 Subject: [PATCH] - djm@cvs.openbsd.org 2007/01/22 11:32:50 [sftp-client.c] return error from do_upload() when a write fails. fixes bz#1252: zero exit status from sftp when uploading to a full device. report from jirkat AT atlas.cz; ok dtucker@ --- ChangeLog | 7 ++++++- sftp-client.c | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9cf67b380..c5590c032 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,11 @@ - stevesk@cvs.openbsd.org 2007/01/21 01:45:35 [readconf.c] spaces + - djm@cvs.openbsd.org 2007/01/22 11:32:50 + [sftp-client.c] + return error from do_upload() when a write fails. fixes bz#1252: zero + exit status from sftp when uploading to a full device. report from + jirkat AT atlas.cz; ok dtucker@ 20070128 - (djm) [channels.c serverloop.c] Fix so-called "hang on exit" (bz #52) @@ -2716,4 +2721,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4613 2007/02/19 11:12:53 dtucker Exp $ +$Id: ChangeLog,v 1.4614 2007/02/19 11:13:39 dtucker Exp $ diff --git a/sftp-client.c b/sftp-client.c index 42eb2b41b..2746f3245 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.75 2006/10/22 02:25:50 djm Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.76 2007/01/22 11:32:50 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -1140,6 +1140,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path, close(local_fd); xfree(data); xfree(ack); + status = -1; goto done; } debug3("In write loop, ack for %u %u bytes at %llu",