svn commit: samba r17220 - in branches/SAMBA_3_0/source/smbd: .
jra at samba.org
jra at samba.org
Tue Jul 25 00:16:46 GMT 2006
Author: jra
Date: 2006-07-25 00:16:45 +0000 (Tue, 25 Jul 2006)
New Revision: 17220
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17220
Log:
If we're going to fail a write with an errno, make
sure we return -1.
Jeremy.
Modified:
branches/SAMBA_3_0/source/smbd/fileio.c
branches/SAMBA_3_0/source/smbd/reply.c
Changeset:
Modified: branches/SAMBA_3_0/source/smbd/fileio.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/fileio.c 2006-07-24 16:01:13 UTC (rev 17219)
+++ branches/SAMBA_3_0/source/smbd/fileio.c 2006-07-25 00:16:45 UTC (rev 17220)
@@ -214,7 +214,7 @@
if (!fsp->can_write) {
errno = EPERM;
- return(0);
+ return -1;
}
if (!fsp->modified) {
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/reply.c 2006-07-24 16:01:13 UTC (rev 17219)
+++ branches/SAMBA_3_0/source/smbd/reply.c 2006-07-25 00:16:45 UTC (rev 17220)
@@ -2807,6 +2807,10 @@
}
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);
More information about the samba-cvs
mailing list