summaryrefslogtreecommitdiffstats
path: root/source3/smbd/smb2_create.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-09-25 23:20:18 +0200
committerStefan Metzmacher <metze@samba.org>2013-10-05 14:04:08 +0200
commit1bd2ab41611fc66386d8d7d0e4c7d4f948177eab (patch)
tree5b67eea907838f0277764373c4d952b35318d85a /source3/smbd/smb2_create.c
parent9769f0697714dcd7835b1c5692a5352e176c9418 (diff)
downloadsamba-1bd2ab41611fc66386d8d7d0e4c7d4f948177eab.tar.gz
samba-1bd2ab41611fc66386d8d7d0e4c7d4f948177eab.tar.xz
samba-1bd2ab41611fc66386d8d7d0e4c7d4f948177eab.zip
smbd:smb2: successfully answer a DHnC request when the initial create was DH2Q
I.e. the durable reconnect attempt is v1 while the original create was durable v2 including the create guid. Implement this by skipping the create_guid verification when the reconnect request is v1. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/smbd/smb2_create.c')
-rw-r--r--source3/smbd/smb2_create.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 93cccf8445..fb9b56e36d 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -550,7 +550,8 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
uint64_t allocation_size = 0;
struct smb2_create_blob *twrp = NULL;
struct smb2_create_blob *qfid = NULL;
- struct GUID create_guid = GUID_zero();
+ struct GUID _create_guid = GUID_zero();
+ struct GUID *create_guid = NULL;
bool update_open = false;
bool durable_requested = false;
uint32_t durable_timeout_msec = 0;
@@ -668,10 +669,11 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
create_guid_blob = data_blob_const(p + 16, 16);
status = GUID_from_ndr_blob(&create_guid_blob,
- &create_guid);
+ &_create_guid);
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
+ create_guid = &_create_guid;
/*
* we need to store the create_guid later
*/
@@ -706,10 +708,11 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
create_guid_blob = data_blob_const(p + 16, 16);
status = GUID_from_ndr_blob(&create_guid_blob,
- &create_guid);
+ &_create_guid);
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
+ create_guid = &_create_guid;
do_durable_reconnect = true;
}
@@ -940,7 +943,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
}
if (update_open) {
- op->global->create_guid = create_guid;
+ op->global->create_guid = _create_guid;
status = smbXsrv_open_update(op);
DEBUG(10, ("smb2_create_send: smbXsrv_open_update "