If the server implements the SMB 3.x dialect family and all of the following conditions are TRUE, the
server MUST look up an Open in GlobalOpenTable where Open.IsReplayEligible is TRUE and
Open.CreateGuid matches the CreateGuid in the SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2
create context and Open.ClientGuid matches the ClientGuid of the connection that received this
request:
...
If an Open is found, the server MUST perform the following:
...
If Open.Session.SessionId is not equal to the current Session.SessionId, the server MUST fail
the request with STATUS_DUPLICATE_OBJECTID.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
^samba3.smb2.replay.durable-reconnect-replay1\(nt4_dc\)
-^samba3.smb2.replay.durable-reconnect-replay2\(nt4_dc\)
^samba3.smb2.replay.durable-reconnect-replay3\(nt4_dc\)
^samba3.smb2.replay.replay-twice-durable\(nt4_dc\)
}
status = smb2srv_open_lookup_replay_cache(smb2req->xconn,
+ smb2req->session,
*state->create_guid,
state->fname,
now,
* retry loop on the client.
*/
NTSTATUS smb2srv_open_lookup_replay_cache(struct smbXsrv_connection *conn,
+ struct smbXsrv_session *session,
struct GUID create_guid,
const char *name,
NTTIME now,
now,
&op);
if (NT_STATUS_IS_OK(status)) {
+ if (op->session->global->session_global_id !=
+ session->global->session_global_id)
+ {
+ TALLOC_FREE(frame);
+ return NT_STATUS_DUPLICATE_OBJECTID;
+ }
DBG_DEBUG("Found local open\n");
-
/*
* We found an open the caller can reuse.
*/
NTSTATUS smbXsrv_open_purge_replay_cache(struct smbXsrv_client *client,
const struct GUID *create_guid);
NTSTATUS smb2srv_open_lookup_replay_cache(struct smbXsrv_connection *conn,
+ struct smbXsrv_session *session,
struct GUID create_guid,
const char *name,
NTTIME now,