3.3.5.8 Receiving an SMB2 TREE_DISCONNECT Request

When the server receives a request with an SMB2 header having a Command value equal to SMB2 TREE_DISCONNECT, message handling proceeds as follows:

Session Verification:

The server MUST locate the session, as specified in section 3.3.5.2.9.

Tree Connect Verification:

The server MUST locate the tree connection, as specified in section 3.3.5.2.11.

For any Open in Session.OpenTable, if Open.TreeConnect matches the tree connect being disconnected, the server MUST close the Open as specified in section 3.3.4.17.

The server MUST provide the tuple <TreeConnect.Share.ServerName, TreeConnect.Share.Name> and TreeConnect.TreeGlobalId as input parameters and deregister TreeConnect by invoking the event specified in [MS-SRVS] section 3.1.6.7. TreeConnect.Share.CurrentUses MUST be decreased by 1. The tree connect MUST then be removed from Session.TreeConnectTable and freed. The server MUST initialize an SMB2 TREE_DISCONNECT Response following the syntax specified in section 2.2.12, and send it to the client.

The status code returned by this operation MUST be one of those defined in [MS-ERREF]. Common status codes returned by this operation include:

  • STATUS_SUCCESS

  • STATUS_INSUFFICIENT_RESOURCES

  • STATUS_USER_SESSION_DELETED

  • STATUS_NETWORK_NAME_DELETED

  • STATUS_INVALID_PARAMETER

  • STATUS_NETWORK_SESSION_EXPIRED

  • STATUS_ACCESS_DENIED

Show: