次の方法で共有


2.2.39 SMB2 SET_INFO Request

The SMB2 SET_INFO Request packet is sent by a client to set information on a file or underlying object store. This request consists of an SMB2 header, as specified in section 2.2.1, followed by this request structure.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

StructureSize

InfoType

FileInfoClass

BufferLength

BufferOffset

Reserved

AdditionalInformation

FileId

...

...

...

Buffer (variable)

...

StructureSize (2 bytes): The client MUST set this field to 33, indicating the size of the request structure, not including the header. The client MUST set this field to this value regardless of how long Buffer[] actually is in the request being sent.

InfoType (1 byte): The type of information being 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 file information, this field MUST contain one of the following FILE_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

  • FilePositionInformation

  • FileRenameInformation

  • FileShortNameInformation

  • FileValidDataLengthInformation

For setting underlying object store information, this field MUST contain one of the following FS_INFORMATION_CLASS values, as specified in [MS-FSCC] section 2.5:

  • FileFsControlInformation

  •  FileFsObjectIdInformation

For setting quota and security information, 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.<82>

Reserved (2 bytes): This field MUST NOT be used and MUST be reserved. The client MUST set this field to 0, and the server MUST ignore it on receipt.

AdditionalInformation (4 bytes): Provides additional information to the server.

If security information is being set, this value MUST contain a 4-byte bit field of flags indicating what security attributes MUST 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, this field MUST be 0.

FileId (16 bytes): An SMB2_FILEID identifier of the file or named pipe on which to perform the set. Set operations for underlying object store and quota information are directed to the volume on which the file resides.

Buffer (variable): A variable-length buffer that contains the information being set for the request, as described by the BufferOffset and BufferLength fields. Buffer format depends on InfoType and the AdditionalInformation, as follows.

InfoType

AdditionalInformation

Buffer format specification

SMB2_0_INFO_FILE

0

See [MS-FSCC] section 2.4.

SMB2_0_INFO_FILESYSTEM

0

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

0

See [MS-FSCC] section 2.4.40.