summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-09-20 00:52:19 +0200
committerKarolin Seeger <kseeger@samba.org>2012-09-28 09:23:07 +0200
commit9f73827a8450d0598781fd85f08236d478670d23 (patch)
tree7af70c82eff78d353069e97d8473bfe7ea47a643
parentb26bf825be046dd0d0424b53f0c09346888a3df7 (diff)
downloadsamba-9f73827a8450d0598781fd85f08236d478670d23.tar.gz
s3:smb2_server: do the req->next_status check before the signing checks
Windows 2012 returns NT_STATUS_INVALID_PARAMETER to the smb2.compound.invalid1 test if that uses signing (instead of NT_STATUS_ACCESS_DENIED). metze (cherry picked from commit 4384485f82aac109bf4c4c31075e313e54b4c076) Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/smbd/smb2_server.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index ede3997909d..bf7f437bebd 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1998,6 +1998,21 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}
+ 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;
+ }
+
if (req->do_encryption) {
signing_required = false;
} else if (flags & SMB2_HDR_FLAG_SIGNED) {
@@ -2046,21 +2061,6 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_ACCESS_DENIED);
}
- 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;
- }
-
if (req->compound_related) {
req->sconn->smb2.compound_related_in_progress = true;
}