The branch, master has been updated
       via  09aea03 CREATE in a compound CREATE/NOTIFY sequence was being 
passed through set_operation_credits() twice (ultimately perhaps because of bug 
7331 involving this compound sequence and the need to be ready for any incoming 
CANCEL of the NOTIFY). This had the server thinking it had granted more credit 
than it actually had, which lead to zero-credits being granted in interim 
NOTIFY responses.
      from  e7707d5 From metze's work on sparse attributes. 
FILE_ATTRIBUTE_SPARSE is valid on get but not on set.

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


- Log -----------------------------------------------------------------
commit 09aea038139f8717d38f0fdae6be9cf46bd86b15
Author: Ken Harris <ken.har...@mathworks.com>
Date:   Mon Dec 20 10:44:48 2010 -0800

    CREATE in a compound CREATE/NOTIFY sequence was being passed through 
set_operation_credits()
    twice (ultimately perhaps because of bug 7331 involving this compound 
sequence and the need
    to be ready for any incoming CANCEL of the NOTIFY). This had the server 
thinking it had
    granted more credit than it actually had, which lead to zero-credits being 
granted in interim
    NOTIFY responses.
    
    Autobuild-User: Jeremy Allison <j...@samba.org>
    Autobuild-Date: Mon Dec 20 20:59:55 CET 2010 on sn-devel-104

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

Summary of changes:
 source3/smbd/smb2_server.c |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 924e41f..025f403 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1443,23 +1443,6 @@ static NTSTATUS smbd_smb2_request_reply(struct 
smbd_smb2_request *req)
 
        req->subreq = NULL;
 
-       smb2_setup_nbt_length(req->out.vector, req->out.vector_count);
-
-       /* Set credit for this operation (zero credits if this
-          is a final reply for an async operation). */
-       smb2_set_operation_credit(req->sconn,
-                       req->async ? NULL : &req->in.vector[i],
-                       &req->out.vector[i]);
-
-       if (req->do_signing) {
-               NTSTATUS status;
-               status = smb2_signing_sign_pdu(req->session->session_key,
-                                              &req->out.vector[i], 3);
-               if (!NT_STATUS_IS_OK(status)) {
-                       return status;
-               }
-       }
-
        req->current_idx += 3;
 
        if (req->current_idx < req->out.vector_count) {
@@ -1482,6 +1465,23 @@ static NTSTATUS smbd_smb2_request_reply(struct 
smbd_smb2_request *req)
                return NT_STATUS_OK;
        }
 
+       smb2_setup_nbt_length(req->out.vector, req->out.vector_count);
+
+       /* Set credit for this operation (zero credits if this
+          is a final reply for an async operation). */
+       smb2_set_operation_credit(req->sconn,
+                       req->async ? NULL : &req->in.vector[i],
+                       &req->out.vector[i]);
+
+       if (req->do_signing) {
+               NTSTATUS status;
+               status = smb2_signing_sign_pdu(req->session->session_key,
+                                              &req->out.vector[i], 3);
+               if (!NT_STATUS_IS_OK(status)) {
+                       return status;
+               }
+       }
+
        if (DEBUGLEVEL >= 10) {
                dbgtext("smbd_smb2_request_reply: sending...\n");
                print_req_vectors(req);


-- 
Samba Shared Repository

Reply via email to