summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-06-09 19:46:29 +0200
committerStefan Metzmacher <metze@samba.org>2009-06-09 19:51:03 +0200
commit66acfbffeb60cff811e32ddc54f44f63d96bf890 (patch)
treec2e88240604390a95afabb4e7009213f39b1bbff /source3/smbd
parent4ae8bf09e66094f794cab9e04226d9b26575006b (diff)
downloadsamba-66acfbffeb60cff811e32ddc54f44f63d96bf890.tar.gz
samba-66acfbffeb60cff811e32ddc54f44f63d96bf890.tar.bz2
samba-66acfbffeb60cff811e32ddc54f44f63d96bf890.zip
s3:smbd: response with the same SMB2 flags as given by the client
...but also add the response flag. metze
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/smb2_server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index f14504249f..35ecd3a893 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -277,6 +277,7 @@ static NTSTATUS smbd_smb2_request_setup_out(struct smbd_smb2_request *req)
for (idx=1; idx < count; idx += 3) {
const uint8_t *inhdr = NULL;
+ uint32_t in_flags;
uint8_t *outhdr = NULL;
uint8_t *outbody = NULL;
uint32_t next_command_ofs = 0;
@@ -288,6 +289,7 @@ static NTSTATUS smbd_smb2_request_setup_out(struct smbd_smb2_request *req)
}
inhdr = (const uint8_t *)req->in.vector[idx].iov_base;
+ in_flags = IVAL(inhdr, SMB2_HDR_FLAGS);
outhdr = talloc_array(vector, uint8_t,
SMB2_HDR_BODY + 8);
@@ -316,7 +318,8 @@ static NTSTATUS smbd_smb2_request_setup_out(struct smbd_smb2_request *req)
SVAL(inhdr, SMB2_HDR_OPCODE));
/* Make up a number for now... JRA. FIXME ! FIXME !*/
SSVAL(outhdr, SMB2_HDR_CREDIT, 20);
- SIVAL(outhdr, SMB2_HDR_FLAGS, SMB2_HDR_FLAG_REDIRECT);
+ SIVAL(outhdr, SMB2_HDR_FLAGS,
+ IVAL(inhdr, SMB2_HDR_FLAGS) | SMB2_HDR_FLAG_REDIRECT);
SIVAL(outhdr, SMB2_HDR_NEXT_COMMAND, next_command_ofs);
SBVAL(outhdr, SMB2_HDR_MESSAGE_ID,
BVAL(inhdr, SMB2_HDR_MESSAGE_ID));