s3:smb2_ioctl/FSCTL_PIPE_TRANSCEIVE: generate STATUS_BUFFER_OVERFLOW if needed (bug...
authorStefan Metzmacher <metze@samba.org>
Fri, 24 Jun 2011 06:54:02 +0000 (08:54 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 24 Jun 2011 09:25:36 +0000 (11:25 +0200)
This should fix DCERPC responses with fragments larger than 1024 bytes.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jun 24 11:25:36 CEST 2011 on sn-devel-104

source3/smbd/smb2_ioctl.c
source3/smbd/smb2_read.c

index bce02b0a3a821650c8b6ea12eaa4423ee041dbda..abb1905ba094ce3727b13bf127de27aa8fa7e906 100644 (file)
@@ -590,6 +590,11 @@ static void smbd_smb2_ioctl_pipe_read_done(struct tevent_req *subreq)
 
        state->out_output.length = nread;
 
+       if (is_data_outstanding) {
+               tevent_req_nterror(req, STATUS_BUFFER_OVERFLOW);
+               return;
+       }
+
        tevent_req_done(req);
 }
 
index 6e686ef2738c174beaf19eb0681e14c47e3687f7..996f8d46aec820cc37cfa97e45bf6dbc21ebdc1f 100644 (file)
@@ -575,6 +575,11 @@ static void smbd_smb2_read_pipe_done(struct tevent_req *subreq)
        state->out_data.length = nread;
        state->out_remaining = 0;
 
+       /*
+        * TODO: add STATUS_BUFFER_OVERFLOW handling, once we also
+        * handle it in SMB1 pipe_read_andx_done().
+        */
+
        tevent_req_done(req);
 }