s3:smb2_server: keep compound_related on struct smbd_smb2_request
authorStefan Metzmacher <metze@samba.org>
Thu, 25 Aug 2011 21:33:41 +0000 (23:33 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 31 Aug 2011 17:49:31 +0000 (19:49 +0200)
metze
(cherry picked from commit cda93f04eb4e7e975b192a5fd33275ec638140ac)

source3/smbd/globals.h
source3/smbd/smb2_server.c

index b9bd21215cd5b23dd34497f36144ca4d9ca0542b..0baf159dd9a0b00f2c972659653cb9377de92024 100644 (file)
@@ -355,6 +355,7 @@ struct smbd_smb2_request {
        bool do_signing;
        bool async;
        bool cancelled;
+       bool compound_related;
 
        /* fake smb1 request. */
        struct smb_request *smb1req;
index 6fc4b5d702eeb1e5a6d666ce8c9dac150210d0d2..0310cb1baa039bf7acf0f6a91f67ec6767d9d421 100644 (file)
@@ -360,7 +360,6 @@ static NTSTATUS smbd_smb2_request_validate(struct smbd_smb2_request *req)
 {
        int count;
        int idx;
-       bool compound_related = false;
 
        count = req->in.vector_count;
 
@@ -408,7 +407,7 @@ static NTSTATUS smbd_smb2_request_validate(struct smbd_smb2_request *req)
                         * compounded requests
                         */
                        if (flags & SMB2_HDR_FLAG_CHAINED) {
-                               compound_related = true;
+                               req->compound_related = true;
                        }
                } else if (idx > 4) {
 #if 0
@@ -421,13 +420,13 @@ static NTSTATUS smbd_smb2_request_validate(struct smbd_smb2_request *req)
                         * all other requests should match the 2nd one
                         */
                        if (flags & SMB2_HDR_FLAG_CHAINED) {
-                               if (!compound_related) {
+                               if (!req->compound_related) {
                                        req->next_status =
                                                NT_STATUS_INVALID_PARAMETER;
                                        return NT_STATUS_OK;
                                }
                        } else {
-                               if (compound_related) {
+                               if (req->compound_related) {
                                        req->next_status =
                                                NT_STATUS_INVALID_PARAMETER;
                                        return NT_STATUS_OK;