The branch, master has been updated
       via  19758b3... Get in_minimum and EOF errors right.
      from  4a97912... Client ignoring max write is a warning, not an error.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 19758b354d835546fd9ba9cb8b9299dcea91b723
Author: Jeremy Allison <[email protected]>
Date:   Wed May 5 09:47:49 2010 -0700

    Get in_minimum and EOF errors right.
    
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/smb2_read.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c
index a858758..a428c26 100644
--- a/source3/smbd/smb2_read.c
+++ b/source3/smbd/smb2_read.c
@@ -289,13 +289,23 @@ static struct tevent_req *smbd_smb2_read_send(TALLOC_CTX 
*mem_ctx,
                tevent_req_nterror(req, NT_STATUS_ACCESS_DENIED);
                return tevent_req_post(req, ev);
        }
-       if (nread == 0 && (in_length != 0 || in_minimum != 0)) {
+       if (nread == 0 && in_length != 0) {
                DEBUG(5,("smbd_smb2_read: read_file[%s] end of file\n",
                         fsp_str_dbg(fsp)));
                tevent_req_nterror(req, NT_STATUS_END_OF_FILE);
                return tevent_req_post(req, ev);
        }
 
+       if (nread < in_minimum) {
+               DEBUG(5,("smbd_smb2_read: read_file[%s] read less %d than "
+                       "minimum requested %u. Returning end of file\n",
+                        fsp_str_dbg(fsp),
+                       (int)nread,
+                       (unsigned int)in_minimum));
+               tevent_req_nterror(req, NT_STATUS_END_OF_FILE);
+               return tevent_req_post(req, ev);
+       }
+
        state->out_data.length = nread;
        state->out_remaining = 0;
        tevent_req_done(req);


-- 
Samba Shared Repository

Reply via email to