From 8d07d7148bf47ea14e62d39ed8a8cc4f1366810e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 27 Oct 2011 13:01:22 +0200 Subject: 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 --- source3/smbd/smb2_server.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'source3/smbd/smb2_server.c') 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; } -- cgit