summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-01-08 23:49:21 +0000
committerJeremy Allison <jra@samba.org>2003-01-08 23:49:21 +0000
commita2cce2f0757413a117f6f69568c0b392ecf3079c (patch)
treeffa649a585682261dee454a9a8e33b398f8b4102 /source3/smbd
parent38aee23f807dad93fb832d97deac57d528a2a175 (diff)
downloadsamba-a2cce2f0757413a117f6f69568c0b392ecf3079c.tar.gz
samba-a2cce2f0757413a117f6f69568c0b392ecf3079c.tar.bz2
samba-a2cce2f0757413a117f6f69568c0b392ecf3079c.zip
Ensure we return disk full by default on short writes.
Jeremy. (This used to be commit 2a974bc284b9d193c24972d073b966eb9b3b3ad0)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index beccc1bba6..ef5a090243 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2011,7 +2011,7 @@ int reply_writeunlock(connection_struct *conn, char *inbuf,char *outbuf,
if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) {
END_PROFILE(SMBwriteunlock);
- return(UNIXERROR(ERRDOS,ERRnoaccess));
+ return(UNIXERROR(ERRHRD,ERRdiskfull));
}
status = do_unlock(fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)numtowrite,
@@ -2092,7 +2092,7 @@ int reply_write(connection_struct *conn, char *inbuf,char *outbuf,int size,int d
if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) {
END_PROFILE(SMBwrite);
- return(UNIXERROR(ERRDOS,ERRnoaccess));
+ return(UNIXERROR(ERRHRD,ERRdiskfull));
}
outsize = set_message(outbuf,1,0,True);
@@ -2187,7 +2187,7 @@ int reply_write_and_X(connection_struct *conn, char *inbuf,char *outbuf,int leng
if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) {
END_PROFILE(SMBwriteX);
- return(UNIXERROR(ERRDOS,ERRnoaccess));
+ return(UNIXERROR(ERRHRD,ERRdiskfull));
}
set_message(outbuf,6,0,True);
@@ -2465,9 +2465,9 @@ int reply_writeclose(connection_struct *conn,
fsp->fnum, (int)numtowrite, (int)nwritten,
conn->num_files_open));
- if (nwritten <= 0) {
+ if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) {
END_PROFILE(SMBwriteclose);
- return(UNIXERROR(ERRDOS,ERRnoaccess));
+ return(UNIXERROR(ERRHRD,ERRdiskfull));
}
if(close_err != 0) {
@@ -2791,7 +2791,7 @@ int reply_printwrite(connection_struct *conn, char *inbuf,char *outbuf, int dum_
if (write_file(fsp,data,-1,numtowrite) != numtowrite) {
END_PROFILE(SMBsplwr);
- return(UNIXERROR(ERRDOS,ERRnoaccess));
+ return(UNIXERROR(ERRHRD,ERRdiskfull));
}
DEBUG( 3, ( "printwrite fnum=%d num=%d\n", fsp->fnum, numtowrite ) );