]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: only check the next_status for related requests
authorStefan Metzmacher <metze@samba.org>
Tue, 9 Jun 2009 17:48:08 +0000 (19:48 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 9 Jun 2009 17:51:03 +0000 (19:51 +0200)
metze

source3/smbd/smb2_server.c

index 35ecd3a89387bb4028a20a8d1eacc0081e21f849..101ccc951a408df64d766a71794c54fdfaa81f3f 100644 (file)
@@ -399,17 +399,18 @@ static NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
                return smbd_smb2_request_error(req, NT_STATUS_ACCESS_DENIED);
        }
 
-       /*
-        * This check is mostly for giving the correct error code
-        * for compounded requests.
-        *
-        * TODO: we may need to move this after the session and tcon checks.
-        */
-       if (!NT_STATUS_IS_OK(req->next_status)) {
-               return smbd_smb2_request_error(req, req->next_status);
-       }
-
-       if ((flags & SMB2_HDR_FLAG_CHAINED) == 0) {
+       if (flags & SMB2_HDR_FLAG_CHAINED) {
+               /*
+                * This check is mostly for giving the correct error code
+                * for compounded requests.
+                *
+                * TODO: we may need to move this after the session
+                *       and tcon checks.
+                */
+               if (!NT_STATUS_IS_OK(req->next_status)) {
+                       return smbd_smb2_request_error(req, req->next_status);
+               }
+       } else {
                req->compat_chain_fsp = NULL;
        }