summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-28 12:27:09 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-28 15:46:01 +0200
commitae1c040b518273fd83797fcde170141aec9fe182 (patch)
tree37735287d52b9286f1fd308a908a02a3db566f75 /source4
parent21ec116bbf51b76f17b9e4054969ef315f5e2dd0 (diff)
downloadsamba-ae1c040b518273fd83797fcde170141aec9fe182.tar.gz
samba-ae1c040b518273fd83797fcde170141aec9fe182.tar.bz2
samba-ae1c040b518273fd83797fcde170141aec9fe182.zip
s4:smb_server/smb: SMBreadX can return STATUS_BUFFER_OVERFLOW
metze
Diffstat (limited to 'source4')
-rw-r--r--source4/smb_server/smb/reply.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/smb_server/smb/reply.c b/source4/smb_server/smb/reply.c
index 7d33a37b4d..ff270944e2 100644
--- a/source4/smb_server/smb/reply.c
+++ b/source4/smb_server/smb/reply.c
@@ -811,7 +811,7 @@ static void reply_read_and_X_send(struct ntvfs_request *ntvfs)
struct smbsrv_request *req;
union smb_read *io;
- SMBSRV_CHECK_ASYNC_STATUS(io, union smb_read);
+ SMBSRV_CHECK_ASYNC_STATUS_ERR(io, union smb_read);
/* readx reply packets can be over-sized */
req->control_flags |= SMBSRV_REQ_CONTROL_LARGE;
@@ -834,6 +834,10 @@ static void reply_read_and_X_send(struct ntvfs_request *ntvfs)
SSVAL(req->out.vwv, VWV(7), (io->readx.out.nread>>16));
SMBSRV_VWV_RESERVED(8, 4);
+ if (!NT_STATUS_IS_OK(req->ntvfs->async_states->status)) {
+ smbsrv_setup_error(req, req->ntvfs->async_states->status);
+ }
+
smbsrv_chain_reply(req);
}