Application Requests an SMB Session Logoff

The application MUST provide the Client.Session of the SMB session to be closed.

The client MUST traverse the Client.Connection.TreeConnectTable, and for each entry in which Client.TreeConnect.Session matches the application-provided Client.Session, the TreeConnect MUST be closed, as specified in section

The client MUST construct an SMB_COM_LOGOFF_ANDX Request (section The request MUST be sent to the server as specified in section The user represented by the Client.Session.SessionUID value, presented in the SMB Header (section, is logged off as follows:

  • The server cancels any outstanding command requests for this UID.

  • The server releases all locks and closes all files opened by this UID; the associated FIDs are invalidated.

  • The server closes all searches currently held open by this UID; the associated SIDs are invalidated.

  • The server disconnects all tree connects created by this UID; the associated TIDs are invalidated.

  • The server invalidates the UID.