summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-02-27 20:15:18 +0100
committerMichael Adam <obnox@samba.org>2012-03-03 17:03:07 +0100
commita92b5f33de6d5d961725f34104a132be1a8dcf52 (patch)
tree92d59848a050923ac110823af0c731ab1b749cb0 /source4/libcli
parentdfbf55bb36e2f5cc798079b3fea2b34cd727e1b3 (diff)
downloadsamba-a92b5f33de6d5d961725f34104a132be1a8dcf52.tar.gz
samba-a92b5f33de6d5d961725f34104a132be1a8dcf52.tar.bz2
samba-a92b5f33de6d5d961725f34104a132be1a8dcf52.zip
s4:libcli:smb2: add support for parsing the durable handle v2 response in smb2_create_recv()
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/smb2/create.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/libcli/smb2/create.c b/source4/libcli/smb2/create.c
index 8b7a4abb0e..c8424dc482 100644
--- a/source4/libcli/smb2/create.c
+++ b/source4/libcli/smb2/create.c
@@ -336,6 +336,25 @@ NTSTATUS smb2_create_recv(struct smb2_request *req, TALLOC_CTX *mem_ctx, struct
}
io->out.durable_open = true;
}
+ if (strcmp(io->out.blobs.blobs[i].tag, SMB2_CREATE_TAG_DH2Q) == 0) {
+ uint32_t flags;
+ uint8_t *data;
+
+ if (io->out.blobs.blobs[i].data.length != 8) {
+ smb2_request_destroy(req);
+ return NT_STATUS_INVALID_NETWORK_RESPONSE;
+ }
+
+ io->out.durable_open = false;
+ io->out.durable_open_v2 = true;
+
+ data = io->out.blobs.blobs[i].data.data;
+ io->out.timeout = IVAL(data, 0);
+ flags = IVAL(data, 4);
+ if ((flags & SMB2_DHANDLE_FLAG_PERSISTENT) != 0) {
+ io->out.persistent_open = true;
+ }
+ }
}
data_blob_free(&blob);