summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-10-27 13:01:22 +0200
committerStefan Metzmacher <metze@samba.org>2011-10-31 19:39:02 +0100
commit8d07d7148bf47ea14e62d39ed8a8cc4f1366810e (patch)
treeb3ecc00b99a31ca21448c4926028d9e86facc15c /source3
parentc7d3b6b2c38711943910aebff72b0188b0c346db (diff)
downloadsamba-8d07d7148bf47ea14e62d39ed8a8cc4f1366810e.tar.gz
samba-8d07d7148bf47ea14e62d39ed8a8cc4f1366810e.tar.bz2
samba-8d07d7148bf47ea14e62d39ed8a8cc4f1366810e.zip
s3:smb2_server: don't reset the tid and session id in the out hdr of compound requests
Windows also leaves tid (0xFFFFFFFF) and session id (0xFFFFFFFFFFFFFFFF) as the client requested them. metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smb2_server.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 5d8acc4203..5bb3c3bc58 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1144,7 +1144,6 @@ static NTSTATUS smbd_smb2_request_check_tcon(struct smbd_smb2_request *req)
uint32_t in_tid;
void *p;
struct smbd_smb2_tcon *tcon;
- bool chained_fixup = false;
inhdr = (const uint8_t *)req->in.vector[i+0].iov_base;
@@ -1165,7 +1164,6 @@ static NTSTATUS smbd_smb2_request_check_tcon(struct smbd_smb2_request *req)
*/
outhdr = (const uint8_t *)req->out.vector[i-3].iov_base;
in_tid = IVAL(outhdr, SMB2_HDR_TID);
- chained_fixup = true;
}
}
@@ -1187,12 +1185,6 @@ static NTSTATUS smbd_smb2_request_check_tcon(struct smbd_smb2_request *req)
req->tcon = tcon;
- if (chained_fixup) {
- /* Fix up our own outhdr. */
- outhdr = (const uint8_t *)req->out.vector[i].iov_base;
- SIVAL(discard_const_p(uint8_t, outhdr), SMB2_HDR_TID, in_tid);
- }
-
return NT_STATUS_OK;
}
@@ -1229,7 +1221,6 @@ static NTSTATUS smbd_smb2_request_check_session(struct smbd_smb2_request *req)
*/
outhdr = (const uint8_t *)req->out.vector[i-3].iov_base;
in_session_id = BVAL(outhdr, SMB2_HDR_SESSION_ID);
- chained_fixup = true;
}
}
@@ -1250,11 +1241,6 @@ static NTSTATUS smbd_smb2_request_check_session(struct smbd_smb2_request *req)
req->session = session;
- if (chained_fixup) {
- /* Fix up our own outhdr. */
- outhdr = (const uint8_t *)req->out.vector[i].iov_base;
- SBVAL(discard_const_p(uint8_t, outhdr), SMB2_HDR_SESSION_ID, in_session_id);
- }
return NT_STATUS_OK;
}