3.2.4.13 Application Requests Querying User Quota Information
The application MUST provide:
A valid Open to a file or directory on a share. The quota information on the object store that underlies the file or directory is the quota information to be queried.
A buffer to receive the quota information and the maximum number of bytes to receive.
RestartScan: A BOOLEAN that indicates whether or not a scan on the volume is to be restarted.
ReturnSingleEntry: A BOOLEAN. If TRUE, then the server MUST return a single user quota information entry.
A security identifier (SID) list, a start SID, or no SID. If the application provides both an SID list and a start SID, then the client MUST fail the request with STATUS_INVALID_PARAMETER.
The client MUST construct an NT_TRANSACT_QUERY_QUOTA subcommand request, as specified in section 2.2.7.5.1, with the following additional requirements:
NT_Trans_Parameters.FID MUST be set to the Fid of the application-supplied Open.
NT_Trans_Parameters.ReturnSingleEntry MUST be set to the value of the application-supplied ReturnSingleEntry BOOLEAN.
NT_Trans_Parameters.RestartScan MUST be set to the value of the application-supplied RestartScan BOOLEAN.
The NT_Trans_Data.SidList field is set to either the application-supplied SID list or start SID. If neither were supplied, then this field is not included.
The NT_Trans_Parameters fields of SidListLength, StartSidLength, and StartSidOffset MUST be set according to the following rules:
If the application provides a SID list (a list of SIDs that represents users whose quota information is to be queried), then the client MUST set the SidList field of the request to this list and set SidListLength to the length of the list. In this case, StartSidLength and StartSidOffset MUST be zero.
If the application provides a start SID (a single SID that indicates to the server where to start user quota information enumeration), then the client MUST set StartSidLength to the length of the SID and StartSidOffset to the offset in bytes of the NT_Trans_Data.SidList field relative to the start of the SMB header. In this case, SidListLength MUST be zero.
If the application does not provide a SID list or a start SID, then StartSidLength, StartSidOffset, and SidListLength MUST be zero. If the application provides both a SID list and a start SID, then the client MUST fail the request and return the error code STATUS_INVALID_PARAMETER to the calling application.
The request is sent to the server.