MS-SMB2: 3.3.5.9.7 Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT Create
Context tells us:
...
If any of the following conditions is TRUE, the server MUST fail the request
with STATUS_OBJECT_NAME_NOT_FOUND:
- Open.Lease is not NULL and the SMB2_CREATE_REQUEST_LEASE_V2 or the
SMB2_CREATE_REQUEST_LEASE create context is not present.
...
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
goto fail;
}
+ if ((e.op_type == LEASE_OPLOCK) && (state->lease == NULL)) {
+ /*
+ * The client didn't send a lease context when reconnecting,
+ * although the handle did have a lease.
+ */
+ DBG_WARNING("Trying to reconnect handle with lease without lease context on [%s]\n",
+ fsp_str_dbg(fsp));
+ state->status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ goto fail;
+ }
+
fsp_apply_share_entry_flags(fsp, e.flags);
fsp->open_time = e.time;
fsp->access_mask = e.access_mask;