- Article
The SMB2 SET_INFO Request packet is sent by a client to setinformation on a file or underlying object store. This request consists of an SMB2 header, as specifiedin section 2.2.1, followed by this request structure.
|
|
|
|
|
|
|
|
| 1 |
|
|
|
|
|
|
|
|
| 2 |
|
|
|
|
|
|
|
|
| 3 |
| |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
StructureSize | InfoType | FileInfoClass | |||||||||||||||||||||||||||||
BufferLength | |||||||||||||||||||||||||||||||
BufferOffset | Reserved | ||||||||||||||||||||||||||||||
AdditionalInformation | |||||||||||||||||||||||||||||||
FileId | |||||||||||||||||||||||||||||||
... | |||||||||||||||||||||||||||||||
... | |||||||||||||||||||||||||||||||
... | |||||||||||||||||||||||||||||||
Buffer (variable) | |||||||||||||||||||||||||||||||
... |
StructureSize (2 bytes): The client MUST setthis field to 33, indicating the size of the request structure, not includingthe header. The client MUST set this field to this value regardless of how longBuffer[] actually is in the request being sent.
InfoType (1 byte): The type of informationbeing set. The valid values are as follows.
Value
Meaning
SMB2_0_INFO_FILE
0x01
The file information is being set.
SMB2_0_INFO_FILESYSTEM
0x02
The underlying object store information is being set.
SMB2_0_INFO_SECURITY
0x03
The security information is being set.
SMB2_0_INFO_QUOTA
0x04
The underlying object store quota information is being set.
FileInfoClass (1 byte): For setting fileinformation, this field MUST contain one of the followingFILE_INFORMATION_CLASS values, as specified in section 3.3.5.21.1 and [MS-FSCC]section 2.4:
FileAllocationInformation
FileBasicInformation
FileDispositionInformation
FileEndOfFileInformation
FileFullEaInformation
FileLinkInformation
FileModeInformation
FilePipeInformation
See AlsoSMB security enhancementsFilePositionInformation
FileRenameInformation
FileShortNameInformation
FileValidDataLengthInformation
For setting underlying objectstore information, this field MUST contain one of the following FS_INFORMATION_CLASSvalues, as specified in [MS-FSCC] section 2.5:
FileFsControlInformation
FileFsObjectIdInformation
For setting quota and securityinformation, this field MUST be 0.
BufferLength (4 bytes): The length, in bytes,of the information to be set.
BufferOffset (2 bytes): The offset, in bytes,from the beginning of the SMB2 header to the information to be set.<78>
Reserved (2 bytes): This field MUST NOT beused and MUST be reserved. The client MUST set this field to 0, and the serverMUST ignore it on receipt.
AdditionalInformation (4 bytes): Providesadditional information to the server.
If security information is being set, this valueMUST contain a 4-byte bit field of flags indicating what security attributesMUST be applied. For more information about security descriptors, see [MS-DTYP]section 2.4.6.
Value
Meaning
OWNER_SECURITY_INFORMATION
0x00000001
The client is setting the owner in the security descriptor of the file or named pipe.
GROUP_SECURITY_INFORMATION
0x00000002
The client is setting the group in the security descriptor of the file or named pipe.
DACL_SECURITY_INFORMATION
0x00000004
The client is setting the discretionary access control list in the security descriptor of the file or named pipe.
SACL_SECURITY_INFORMATION
0x00000008
The client is setting the system access control list in the security descriptor of the file or named pipe.
LABEL_SECURITY_INFORMATION
0x00000010
The client is setting the integrity label in the security descriptor of the file or named pipe.
ATTRIBUTE_SECURITY_INFORMATION
0x00000020
The client is setting the resource attribute in the security descriptor of the file or named pipe.
SCOPE_SECURITY_INFORMATION
0x00000040
The client is setting the central access policy of the resource in the security descriptor of the file or named pipe.
BACKUP_SECURITY_INFORMATION
0x00010000
The client is setting the backup operation information in the security descriptor of the file or named pipe.
For all other set requests, thisfield MUST be 0.
FileId (16 bytes): An SMB2_FILEID identifier ofthe file or named pipe on which to perform the set. Set operations forunderlying object store and quota information are directed to the volume onwhich the file resides.
Buffer (variable): A variable-length bufferthat contains the information being set for the request, as described by the BufferOffsetand BufferLength fields. Buffer format depends on InfoType andthe AdditionalInformation, as follows.
InfoType
AdditionalInformation
Buffer format specification
SMB2_0_INFO_FILE
See [MS-FSCC] section 2.4.
SMB2_0_INFO_FILESYSTEM
See [MS-FSCC] section 2.5.
SMB2_0_INFO_SECURITY
Any combination of the values:
OWNER_SECURITY_INFORMATION
GROUP_SECURITY_INFORMATION
LABEL_SECURITY_INFORMATION
DACL_SECURITY_INFORMATION
SACL_SECURITY_INFORMATION
The security descriptor data structure, as specified in [MS-DTYP] section 2.4.6, populated with the data specified by the AdditionalInformation value.
SMB2_0_INFO_QUOTA
See [MS-FSCC] section 2.4.36.