From 120422f7233446e8ca366ee7c4593cdbead79508 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 25 Jul 2006 00:16:45 +0000 Subject: r17220: If we're going to fail a write with an errno, make sure we return -1. Jeremy. (This used to be commit 89b83237b03066785ca4bf3b9d120519bddeffad) --- source3/smbd/reply.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/smbd/reply.c') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index edaf5d8062..e38edadee4 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2807,6 +2807,10 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size, } nwritten = write_file(fsp,inbuf+4,startpos+nwritten,numtowrite); + if (nwritten == -1) { + END_PROFILE(SMBwritebraw); + return(UNIXERROR(ERRHRD,ERRdiskfull)); + } if (nwritten < (ssize_t)numtowrite) { SCVAL(outbuf,smb_rcls,ERRHRD); -- cgit