3.2.4.15 Application Requests Applying Quota Information

The application provides:

  • A handle to the Open identifying a directory.

  • A list of SIDs (as specified in [MS-DTYP] section 2.4.2) for which quota information is to be applied.

  • For each SID, the quota warning threshold and quota limit to be applied, as specified in [MS-FSCC] section 2.4.33.

If the handle is invalid, or if no Open referenced by the handle is found, the client MUST return an implementation-specific error code. If the handle is valid and Open is found, the client MUST proceed as follows.

If Open.Connection is NULL, and Open.Durable is TRUE, the client SHOULD attempt to reconnect to this open, as specified in section 3.2.4.4. If the reconnect succeeds, the set MUST be retried. If it fails, the error code MUST be returned to the application.

If Open.Connection is NULL, and Open.Durable is FALSE, the client MUST fail the set operation.

If Open.Connection is not NULL, the client initializes an SMB2 SET_INFO Request, following the syntax specified in section 2.2.37. The SMB2 header MUST be initialized as follows:

  • The Command field is set to SMB2 SET_INFO.

  • The MessageId field is set as specified in section 3.2.4.1.3.

  • The SessionId field is set to Open.TreeConnect.Session.SessionId.

  • The TreeId field is set to Open.TreeConnect.TreeConnectId.

The SMB2 SET_INFO Request MUST be initialized as follows:

  • The InfoType field is set to SMB2_0_INFO_QUOTA.

  • The FileInfoClass field is set to 0.

  • The AdditionalInformation is set to 0.

  • The FileId field is set to Open.FileId.

  • The Buffer field is set to one or more FILE_QUOTA_INFORMATION structures, as specified in [MS-FSCC] section 2.4.33.

    • The NextEntryOffset field is set to the offset, in bytes, to the next FILE_QUOTA_INFORMATION structure, or zero if this is the last structure in the buffer.

    • The Sid field is set to the application-provided SID, in little-endian binary format as specified in [MS-DTYP] section 2.4.2.2.

    • The SidLength field is set to the length of the Sid field, in bytes.

    • The ChangeTime field is set to the current time, as specified in [MS-DTYP] section 2.3.3.

    • The QuotaUsed field is ignored and can be set to any value.

    • The QuotaThreshold field is set to the application provided quota warning threshold.

    • The QuotaLimit field is set to the application provided quota limit.

  • The BufferLength is set to the length, in bytes, of the Buffer field. A BufferLength exceeding Connection.MaxTransactSize will be rejected by the server.

  • The BufferOffset is set to the offset to the Buffer, in bytes, from the beginning of the SMB2 header.

The request MUST be sent to the server.

Show: