Export (0) Print
Expand All

3.3.5.9.7 Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT Create Context

The client is requesting a reconnect to an existing durable or resilient open.

If the create request also includes an SMB2_CREATE_DURABLE_HANDLE_REQUEST create context, the server MUST ignore the SMB2_CREATE_DURABLE_HANDLE_REQUEST create context.

If the create request also contains an SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 or SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 create context, the server SHOULD<267> fail the request with STATUS_INVALID_PARAMETER.

There is no processing done for "Path Name Validation" or "Open Execution" as listed in the section above.

The processing changes involved for this create context are:

  1. The server MUST look up an existing open in the GlobalOpenTable by doing a lookup with the FileId.Persistent portion of the create context. If the lookup fails, the server SHOULD<268> fail the request with STATUS_OBJECT_NAME_NOT_FOUND and proceed as specified in "Failed Open Handling" in section 3.3.5.9.

  2. If Open.Lease is not NULL and Open.ClientGuid is not equal to the ClientGuid of the connection that received this request, the server MUST fail the create request with STATUS_OBJECT_NAME_NOT_FOUND.

  3. If Open.Lease is not NULL and Open.FileName does not match the file name specified in the Buffer field of the SMB2 CREATE request, the server MUST fail the request with STATUS_INVALID_PARAMETER.

  4. If Open.Lease is not NULL and the SMB2_CREATE_REQUEST_LEASE_V2 or the SMB2_CREATE_REQUEST_LEASE create context is not present, the server MUST fail the request with STATUS_OBJECT_NAME_NOT_FOUND.

  5. If Open.Lease is NULL and the SMB2_CREATE_REQUEST_LEASE_V2 or the SMB2_CREATE_REQUEST_LEASE create context is present, the server MUST fail the request with STATUS_OBJECT_NAME_NOT_FOUND.

  6. If Open.IsDurable is FALSE and Open.IsResilient is FALSE or unimplemented, the server MUST fail the request with STATUS_OBJECT_NAME_NOT_FOUND and proceed as specified in "Failed Open Handling" in section 3.3.5.9

  7. If Open.Session is not NULL, the server MUST fail the request with STATUS_OBJECT_NAME_NOT_FOUND.

  8. If an SMB2_CREATE_REQUEST_LEASE_V2 create context is also present in the request, Connection.Dialect belongs to the SMB 3.x dialect family, the server supports directory leasing, Open.Lease is not NULL, and Open.Lease.LeaseKey does not match the LeaseKey provided in the SMB2_CREATE_REQUEST_LEASE_V2 create context, the server MUST fail the request with STATUS_OBJECT_NAME_NOT_FOUND and proceed as specified in "Failed Open Handling" in section 3.3.5.9.

  9. If an SMB2_CREATE_REQUEST_LEASE create context is also present in the request, Connection.Dialect is "2.100" or belongs to the SMB 3.x dialect family, the server supports leasing, Open.Lease is not NULL, and Open.Lease.LeaseKey does not match the LeaseKey provided in the SMB2_CREATE_REQUEST_LEASE create context, the server MUST fail the request with STATUS_OBJECT_NAME_NOT_FOUND and proceed as specified in "Failed Open Handling" in section 3.3.5.9.

  10. If the user represented by Session.SecurityContext is not the same user denoted by Open.DurableOwner, the server MUST fail the request with STATUS_ACCESS_DENIED and proceed as specified in "Failed Open Handling" in section 3.3.5.9.

  11. The server MUST set the Open.Connection to refer to the connection that received this request.

  12. The server MUST set the Open.Session to refer to the session that received this request.

  13. The server MUST set the Open.TreeConnect to refer to the tree connect that received this request, and Open.TreeConnect.OpenCount MUST be increased by 1.

  14. The server MUST regenerate Open.FileId (the volatile portion of the SMB2_FILEID).

  15. The server MUST insert the open into the Session.OpenTable with the Open.FileId as the new key.

  16. The "Successful Open Initialization" and "Oplock Acquisition" phases MUST be skipped, and processing MUST continue as specified in "Response Construction".

  17. In the "Response Construction" phase:

    The server MAY<269> construct an SMB2_CREATE_DURABLE_HANDLE_RESPONSE create context, as specified in section 2.2.14.2.3, and include it in the buffer described by the response CreateContextLength and CreateContextOffset fields.

    If Connection.Dialect belongs to the SMB 3.x dialect family, the server supports directory leasing, Open.Lease is not NULL, and Lease.Version is 2, then the server MUST construct an SMB2_CREATE_RESPONSE_LEASE_V2 create context, following the syntax specified in section 2.2.14.2.11, and include it in the buffer described by the response CreateContextLength and CreateContextOffset fields. This structure MUST have the following values set:

    • LeaseKey MUST be set to Lease.LeaseKey.

    • LeaseState MUST be set to Lease.LeaseState.

    • ParentLeaseKey MUST be set to the ParentLeaseKey in the request.

    If Connection.Dialect belongs to the SMB 3.x dialect family, the server supports leasing, Open.Lease is not NULL, and Lease.Version is 1, then the server MUST construct an SMB2_CREATE_RESPONSE_LEASE Create Context, following the syntax specified in section 2.2.14.2.10, and include it in the buffer described by the response CreateContextLength and CreateContextOffset fields. This structure MUST have the following values set:

    • LeaseKey MUST be set to Lease.LeaseKey.

    • LeaseState MUST be set to Lease.LeaseState.

    If Connection.Dialect is "2.100", the server supports leasing, and Open.Lease is not NULL, then the server MUST construct an SMB2_CREATE_RESPONSE_LEASE create context, following the syntax specified in section 2.2.14.2.10, and include it in the buffer described by the response CreateContextLength and CreateContextOffset. This structure MUST have the following values set:

    • LeaseKey MUST be set to Lease.LeaseKey.

    • LeaseState MUST be set to Lease.LeaseState.

 
Show:
© 2015 Microsoft