]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd:smb2: add check for session_status for compound requests (cherry picked from...
authorMichael Adam <obnox@samba.org>
Sat, 22 Sep 2012 02:06:27 +0000 (04:06 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 28 Sep 2012 07:12:46 +0000 (09:12 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/smb2_server.c

index 6c110a4ab0105b67bd5d918abff0fe80e9087c6b..4736f983a70cfea57b6b564dd702d28bab0bc64d 100644 (file)
@@ -1373,13 +1373,13 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
                /*
                 * 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 (!NT_STATUS_IS_OK(session_status)) {
+                       return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
+               }
        } else {
                req->compat_chain_fsp = NULL;
        }