Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

3.2.5.8 Receiving an SMB2 CREATE Response for an Open Reestablishment

If the Status field of the SMB2 header of the response indicates an error, the client MUST return the received status code to the caller of section 3.2.4.4 that initiated the open reestablishment operation.

The client MUST locate the corresponding request in Connection.OutstandingRequests using the MessageId field of the SMB2 header. If the request is for an open reestablishment, then the processing MUST continue as specified below using the Open associated with this request in section 3.2.4.4.

If the Status field of the SMB2 header of the response indicates success, the client MUST locate the session in the Connection.SessionTable using the SessionId in the SMB2 header of the response. The client MUST locate a tree connect in the Session.TreeConnectTable using the TreeId in the SMB2 header of the response. The following fields MUST be reinitialized:

  • Open.FileId MUST be set to the FileId received in the SMB2 CREATE Response following the SMB2 header.

  • Open.TreeConnect MUST be set to the tree connect that was looked up in the Session.TreeConnectTable.

  • Open.Connection MUST be set to the connection on which the response was received.

The client MUST insert the Open into the Session.OpenTable.

If Connection.Dialect is not "2.002" and Connection.SupportsFileLeasing is TRUE, the client MUST locate the File corresponding to Open.FileName in the GlobalFileTable. If no File is found, the client MUST create a new File entry and add it to the GlobalFileTable and assign a new File.LeaseKey, as specified in section 3.2.1.5, to the entry. File.OpenTable MUST be initialized to an empty table and File.LeaseState MUST be initialized to SMB2_LEASE_NONE. The client MUST insert the Open into File.OpenTable.

If Connection.Dialect is not "2.002" and an SMB2_CREATE_RESPONSE_LEASE create context is present in the SMB2 CREATE response returned from the server, the client MUST do the following:

  • If Connection.SupportsFileLeasing is FALSE, the client MUST return an error to the caller of section 3.2.4.4 that initiated the open reestablishment operation.

  • Otherwise, the client MUST copy the LeaseState in the response to File.LeaseState.

If Connection.Dialect belongs to the SMB 3.x dialect family and an SMB2_CREATE_RESPONSE_LEASE_V2 create context is present in the SMB2 CREATE response returned from the server, the client MUST do the following:

  • If Connection.SupportsDirectoryLeasing is FALSE, the client MUST return an error to the caller of section 3.2.4.4 that initiated the open reestablishment operation.

  • Otherwise, the client MUST copy the LeaseState in the response to File.LeaseState.

If Connection.Dialect belongs to the SMB 3.x dialect family and the Connection.SupportsDirectoryLeasing is TRUE, the client MUST search the GlobalFileTable for the parent directory of the file opened. The name of the parent directory is obtained by removing the last component of the path in Open.FileName. If an entry is not found, a new File entry MUST be created and added to the GlobalFileTable and a File.LeaseKey, as specified in section 3.2.1.5, MUST be assigned to the entry. File.OpenTable MUST be initialized to an empty table and File.LeaseState MUST be initialized to SMB2_LEASE_NONE.

The client MUST return success to the caller of section 3.2.4.4 that initiated the open reestablishment operation.

The client MUST attempt to replay any requests in Open.OutstandingRequests.

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.