summaryrefslogtreecommitdiff
path: root/source3/smbd/smbXsrv_open.c
diff options
context:
space:
mode:
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;
}