Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

3.3.5.6 Receiving an SMB2 LOGOFF Request

When the server receives a request with an SMB2 header with a Command value equal to SMB2 LOGOFF, message handling MUST proceed as follows.

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

The server MUST remove this session from the GlobalSessionTable and also from the Connection.SessionTable, and deregister the session by invoking the event specified in [MS-SRVS] section 3.1.6.3, providing Session.SessionGlobalId as input parameter. ServerStatistics.sts0_sopens MUST be decreased by 1. The server MUST close every Open in Session.OpenTable of the old session, where Open.IsDurable is FALSE and Open.IsResilient is FALSE, as specified in section 3.3.4.17. For all opens in Session.OpenTable where Open.IsDurable is TRUE or Open.IsResilient is TRUE, the server MUST set Open.Session, Open.Connection, and Open.TreeConnect to NULL. Any tree connects in Session.TreeConnectTable of the old session MUST be deregistered by invoking the event specified in [MS-SRVS] section 3.1.6.7, providing the tuple <TreeConnect.Share.ServerName, TreeConnect.Share.Name> and TreeConnect.TreeGlobalId as input parameters, and each of them MUST be freed. For each deregistered TreeConnect, TreeConnect.Share.CurrentUses MUST be decreased by 1.

If Connection.Dialect belongs to the SMB 3.x dialect family, the server MUST remove the session from each Channel.Connection.SessionTable in Session.ChannelList. All channels in Session.ChannelList MUST be removed and freed.

The server MUST construct an SMB2 LOGOFF Response with a status code of STATUS_SUCCESS, following the syntax specified in section 2.2.8, and send it to the client. The session itself is then freed.

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_USER_SESSION_DELETED

  • STATUS_INVALID_PARAMETER

  • STATUS_NETWORK_SESSION_EXPIRED

  • STATUS_ACCESS_DENIED

Show:
© 2015 Microsoft