Using a handle, eg processing an SMB2_WRITE operation, removes the replay cache
record associated with open.
If the handle is a Persistent Handle, the replay must fail with
NT_STATUS_FILE_NOT_AVAILABLE in this case, whereas for a Durable Handle without
persistency, the replay would be handled as a new create.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
if (val.dsize == 0) {
struct smbXsrv_open_global_key_buf open_key_buf;
+ if (replay_operation && persistent_requested) {
+ DBG_DEBUG("Replay on Persistent Handle, "
+ "no replay record found\n");
+ TALLOC_FREE(frame);
+ return NT_STATUS_FILE_NOT_AVAILABLE;
+ }
+
DBG_DEBUG("Fresh replay-cache record\n");
val = smbXsrv_open_global_id_to_key(0, &open_key_buf);