3.3.4.14 Server Application Queries a Session

The calling application MUST provide GlobalSessionId as an identifier for the Session. The server MUST enumerate all connections in Server.ConnectionTable and MUST look up a Session in Server.Connection.SessionTable where GlobalSessionId is equal to Server.Session.SessionGlobalId. If a Session is found, the server MUST return the Session in a SESSION_INFO_502 structure ([MS-SRVS] section 2.2.4.15) with the following values set and MUST return STATUS_SUCCESS to the calling application.

SESSION_INFO_502  parameters

[MS-CIFS] Session properties

sesi502_cname

Session.Connection.ClientName

sesi502_username

Server.Session.UserName

sesi502_num_opens

The count of entries in Session.Connection.FileOpenTable where Open.Session matches the current session.

sesi502_time

Current time minus Session.CreationTime.

sesi502_idle_time

Current time minus Session.IdleTime.

sesi502_user_flags

MUST be set to SESS_GUEST if Session.UserName represents a Guest account; otherwise, MUST be set to 0x00000000.

sesi502_cltype_name

An empty string.

sesi502_transport

 Session.Connection.TransportName

If no Session is found, the server MUST return an implementation-dependent error.