summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-06-05 20:14:17 +0200
committerStefan Metzmacher <metze@samba.org>2009-06-05 20:17:44 +0200
commitd1db140a73e6d443fb2f82ea6a02479c98e97e67 (patch)
tree8e9597c00d7526620b370bd9b868db0a4d2f92f6
parent76acd7bfad6b1853d73d27f62396aa6ce541f269 (diff)
downloadsamba-d1db140a73e6d443fb2f82ea6a02479c98e97e67.tar.gz
samba-d1db140a73e6d443fb2f82ea6a02479c98e97e67.tar.bz2
samba-d1db140a73e6d443fb2f82ea6a02479c98e97e67.zip
s3:smbd: add support for STATUS_BUFFER_OVERFLOW to SMB2 Ioctl
metze
-rw-r--r--source3/smbd/smb2_ioctl.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c
index e7a3d358bb..cc3b537f2a 100644
--- a/source3/smbd/smb2_ioctl.c
+++ b/source3/smbd/smb2_ioctl.c
@@ -120,7 +120,9 @@ static void smbd_smb2_request_ioctl_done(struct tevent_req *subreq)
status = smbd_smb2_ioctl_recv(subreq, req, &out_output_buffer);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_EQUAL(status, STATUS_BUFFER_OVERFLOW)) {
+ /* also ok */
+ } else if (!NT_STATUS_IS_OK(status)) {
error = smbd_smb2_request_error(req, status);
if (!NT_STATUS_IS_OK(error)) {
smbd_server_connection_terminate(req->conn,
@@ -166,7 +168,8 @@ static void smbd_smb2_request_ioctl_done(struct tevent_req *subreq)
*/
outdyn = out_output_buffer;
- error = smbd_smb2_request_done(req, outbody, &outdyn);
+ error = smbd_smb2_request_done_ex(req, status, outbody, &outdyn,
+ __location__);
if (!NT_STATUS_IS_OK(error)) {
smbd_server_connection_terminate(req->conn,
nt_errstr(error));
@@ -351,13 +354,15 @@ static NTSTATUS smbd_smb2_ioctl_recv(struct tevent_req *req,
struct smbd_smb2_ioctl_state);
if (tevent_req_is_nterror(req, &status)) {
- tevent_req_received(req);
- return status;
+ if (!NT_STATUS_EQUAL(status, STATUS_BUFFER_OVERFLOW)) {
+ tevent_req_received(req);
+ return status;
+ }
}
*out_output = state->out_output;
talloc_steal(mem_ctx, out_output->data);
tevent_req_received(req);
- return NT_STATUS_OK;
+ return status;
}