3.3.5.20 Receiving an SMB2 QUERY_INFO Request

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

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

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

Next, the server MUST locate the open on which the client is requesting the information by performing a lookup in the Session.OpenTable, using the FileId.Volatile of the request as the lookup key. If no open is found, or if Open.DurableFileId is not equal to FileId.Persistent, the server MUST fail the request with STATUS_FILE_CLOSED. Otherwise, the server MUST locate the Request in Connection.RequestList for which Request.MessageId matches the MessageId value in the SMB2 header, and set Request.Open to the Open.

If Open.IsPersistent is FALSE and Open.IsReplayEligible is TRUE, the server MUST set Open.IsReplayEligible to FALSE.

If OutputBufferLength is greater than Connection.MaxTransactSize, the server SHOULD<408> fail the request with STATUS_INVALID_PARAMETER.

If Connection.SupportsMultiCredit is TRUE, the server MUST validate CreditCharge based on the maximum of InputBufferLength and OutputBufferLength, as specified in section 3.3.5.2.5. If the validation fails, it MUST fail the request with STATUS_INVALID_PARAMETER.

The server MUST verify the InputBufferLength as noted in the following:

  • For quota requests, if the InputBufferLength is not equal to the size of SMB2_QUERY_QUOTA_INFO in the request, the server MUST fail the request with STATUS_INVALID_PARAMETER.

  • For FileFullEaInformation requests, if InputBufferLength is not equal to the size of Buffer in the request, the server MUST fail the request with STATUS_INVALID_PARAMETER.

  • For other information queries, the server MUST ignore the InputBufferLength value.

The remaining processing for this request depends on the InfoType that is requested and described below.

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_ACCESS_DENIED

  • STATUS_FILE_CLOSED

  • STATUS_NETWORK_NAME_DELETED

  • STATUS_USER_SESSION_DELETED

  • STATUS_NETWORK_SESSION_EXPIRED

  • STATUS_INVALID_PARAMETER

  • STATUS_INVALID_INFO_CLASS

  • STATUS_NOT_SUPPORTED

  • STATUS_EA_LIST_INCONSISTENT

  • STATUS_BUFFER_OVERFLOW

  • STATUS_CANCELLED

  • STATUS_INFO_LENGTH_MISMATCH