summaryrefslogtreecommitdiff
path: root/source3/smbd/smbXsrv_open.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/smbXsrv_open.c
parent9769f0697714dcd7835b1c5692a5352e176c9418 (diff)
downloadsamba-1bd2ab41611fc66386d8d7d0e4c7d4f948177eab.tar.gz
samba-1bd2ab41611fc66386d8d7d0e4c7d4f948177eab.tar.bz2
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/smbXsrv_open.c')
-rw-r--r--source3/smbd/smbXsrv_open.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/smbXsrv_open.c b/source3/smbd/smbXsrv_open.c
index 27dd50c65a..25dc6f7005 100644
--- a/source3/smbd/smbXsrv_open.c
+++ b/source3/smbd/smbXsrv_open.c
@@ -1168,7 +1168,7 @@ NTSTATUS smb2srv_open_lookup(struct smbXsrv_connection *conn,
NTSTATUS smb2srv_open_recreate(struct smbXsrv_connection *conn,
struct auth_session_info *session_info,
uint64_t persistent_id,
- struct GUID create_guid,
+ const struct GUID *create_guid,
NTTIME now,
struct smbXsrv_open **_open)
{
@@ -1207,7 +1207,15 @@ NTSTATUS smb2srv_open_recreate(struct smbXsrv_connection *conn,
return status;
}
- if (!GUID_equal(&op->global->create_guid, &create_guid)) {
+ /*
+ * If the provided create_guid is NULL, this means that
+ * the reconnect request was a v1 request. In that case
+ * we should skipt the create GUID verification, since
+ * it is valid to v1-reconnect a v2-opened handle.
+ */
+ if ((create_guid != NULL) &&
+ !GUID_equal(&op->global->create_guid, create_guid))
+ {
TALLOC_FREE(op);
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}