220.127.116.11.3 Handling SMB2_0_INFO_SECURITY
The server MUST ignore any flag value in the AdditionalInformation field that is not specified in section 2.2.37.
The server SHOULD<340> call into the underlying object store to query the security descriptor for the object.
The fields required in the resulting security descriptor are denoted by the flags given in the AdditionalInformation field of the request.
If the OutputBufferLength given in the client request is either zero or is insufficient to hold the information requested, the server MUST fail the request with STATUS_BUFFER_TOO_SMALL. The server MUST return error data containing the buffer size, in bytes, that would be required to return the requested information, as specified in section 2.2.2 with ByteCount set to 4. The server MUST NOT return STATUS_BUFFER_OVERFLOW with an incomplete security descriptor to the client as in the previous cases. If the underlying object store returns an error, the server MUST fail the request with the error code received.
If the underlying object store returns the information successfully, the server MUST construct an SMB2 QUERY_INFO Response with the following values:
OutputBufferOffset MUST be set to the offset, in bytes, from the beginning of the SMB2 header to the attribute data at Buffer.
OutputBufferLength MUST be set to the length of the attribute data being returned to the client.
The security descriptor MUST be placed in the response in Buffer.
The response MUST then be sent to the client.