summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-05-14 18:02:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:26 -0500
commitbf62b6642c77e14142cdb724dc99dd3f8bfd89ac (patch)
tree2b17ad07f9b77bb5ec7d4397b8306e02938095ba /source4/libcli
parent37f8c04d900df00dd984dfd6be33b367b145a3ac (diff)
downloadsamba-bf62b6642c77e14142cdb724dc99dd3f8bfd89ac.tar.gz
samba-bf62b6642c77e14142cdb724dc99dd3f8bfd89ac.tar.bz2
samba-bf62b6642c77e14142cdb724dc99dd3f8bfd89ac.zip
r22866: handle incoming chained smb2 requests in our server code to let
the windows explorer in longhorn beta3 work. metze (This used to be commit 2390c9f24daccec917608cac0870890cdc73cb1c)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/smb2/request.c24
-rw-r--r--source4/libcli/smb2/smb2.h2
2 files changed, 13 insertions, 13 deletions
diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c
index 87c4dd78e1..ef024d53f8 100644
--- a/source4/libcli/smb2/request.c
+++ b/source4/libcli/smb2/request.c
@@ -80,18 +80,18 @@ struct smb2_request *smb2_request_init(struct smb2_transport *transport, uint16_
req->out.body_size = body_fixed_size;
req->out.dynamic = (body_dynamic_size ? req->out.body + body_fixed_size : NULL);
- SIVAL(req->out.hdr, 0, SMB2_MAGIC);
- SSVAL(req->out.hdr, SMB2_HDR_LENGTH, SMB2_HDR_BODY);
- SSVAL(req->out.hdr, SMB2_HDR_PAD1, 0);
- SIVAL(req->out.hdr, SMB2_HDR_STATUS, 0);
- SSVAL(req->out.hdr, SMB2_HDR_OPCODE, opcode);
- SSVAL(req->out.hdr, SMB2_HDR_UNKNOWN1,0);
- SIVAL(req->out.hdr, SMB2_HDR_FLAGS, 0);
- SIVAL(req->out.hdr, SMB2_HDR_UNKNOWN2,0);
- SBVAL(req->out.hdr, SMB2_HDR_SEQNUM, req->seqnum);
- SIVAL(req->out.hdr, SMB2_HDR_PID, 0);
- SIVAL(req->out.hdr, SMB2_HDR_TID, 0);
- SBVAL(req->out.hdr, SMB2_HDR_UID, 0);
+ SIVAL(req->out.hdr, 0, SMB2_MAGIC);
+ SSVAL(req->out.hdr, SMB2_HDR_LENGTH, SMB2_HDR_BODY);
+ SSVAL(req->out.hdr, SMB2_HDR_PAD1, 0);
+ SIVAL(req->out.hdr, SMB2_HDR_STATUS, 0);
+ SSVAL(req->out.hdr, SMB2_HDR_OPCODE, opcode);
+ SSVAL(req->out.hdr, SMB2_HDR_UNKNOWN1, 0);
+ SIVAL(req->out.hdr, SMB2_HDR_FLAGS, 0);
+ SIVAL(req->out.hdr, SMB2_HDR_CHAIN_OFFSET, 0);
+ SBVAL(req->out.hdr, SMB2_HDR_SEQNUM, req->seqnum);
+ SIVAL(req->out.hdr, SMB2_HDR_PID, 0);
+ SIVAL(req->out.hdr, SMB2_HDR_TID, 0);
+ SBVAL(req->out.hdr, SMB2_HDR_UID, 0);
memset(req->out.hdr+SMB2_HDR_SIG, 0, 16);
/* set the length of the fixed body part and +1 if there's a dynamic part also */
diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
index 586acaccf6..4db7c126d8 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -164,7 +164,7 @@ struct smb2_request {
#define SMB2_HDR_OPCODE 0x0c
#define SMB2_HDR_UNKNOWN1 0x0e
#define SMB2_HDR_FLAGS 0x10
-#define SMB2_HDR_UNKNOWN2 0x14
+#define SMB2_HDR_CHAIN_OFFSET 0x14
#define SMB2_HDR_SEQNUM 0x18
#define SMB2_HDR_PID 0x20
#define SMB2_HDR_TID 0x24