summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2007-01-22 11:32:51 +0000
committerDamien Miller <djm@cvs.openbsd.org>2007-01-22 11:32:51 +0000
commitcf800063d6b93ddeb27e7e68f7172a338a7a0e21 (patch)
treef99fd55858b2a52cd680d745ceed7e649aaaa512
parent391dc46275b59fe50453427e3fc28302892c602b (diff)
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@
-rw-r--r--usr.bin/ssh/sftp-client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c
index 6595e64e56a..78f364d0ce6 100644
--- a/usr.bin/ssh/sftp-client.c
+++ b/usr.bin/ssh/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 <djm@openbsd.org>
*
@@ -1130,6 +1130,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",