Partager via


2.2.4.7.2 Server Response Extensions

When a server returns extended information, the response takes the following format. Aside from the WordCount, MaximalShareAccessRights, and GuestMaximalShareAccessRights fields, and the new OptionalSupport flags, all other fields are defined as specified in [MS-CIFS] section 2.2.4.55.2.

 SMB_Parameters
   {
   UCHAR  WordCount;
   Words
     {
     UCHAR       AndXCommand;
     UCHAR       AndXReserved;
     USHORT      AndXOffset;
     USHORT      OptionalSupport;
     ACCESS_MASK MaximalShareAccessRights;
     ACCESS_MASK GuestMaximalShareAccessRights;
     }
   }
 SMB_Data
   {
   USHORT ByteCount;
   Bytes
     {
     OEM_STRING Service;
     UCHAR      Pad[];
     SMB_STRING NativeFileSystem;
     }
   }

SMB_Parameters


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

WordCount

Words (14 bytes)

...

...

...

WordCount (1 byte): The value of this field MUST be 0x07.

Words (14 bytes):


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

AndXCommand

AndXReserved

AndXOffset

OptionalSupport

MaximalShareAccessRights

...

GuestMaximalShareAccessRights

...

OptionalSupport (2 bytes): The following OptionalSupport bit fields are new extensions: SMB_CSC_MASK, SMB_UNIQUE_FILE_NAME, and SMB_EXTENDED_SIGNATURES. Values from [MS-CIFS] are included for completeness. The values of SMB_CSC_MASK each have their own name and are included for reference purposes only. Any combination of the following flags MUST be supported. All undefined values are considered reserved. The server SHOULD set them to zero and the client MUST ignore them.

Name & bitmask

Value

Meaning

SMB_SUPPORT_SEARCH_BITS

0x0001

0

If set, then the server supports the use of SMB_FILE_ATTRIBUTES Search Attributes in client directory search requests, as specified in [MS-CIFS].

1

SMB_SHARE_IS_IN_DFS

0x0002

0

If set, this share is managed by Distributed File System (DFS), as specified in [MS-DFSC].

1

SMB_CSC_MASK

0x000C

0

SMB_CSC_CACHE_MANUAL_REINT Clients are allowed to cache files that the user requests for offline use, but there is no automatic file-by-file reintegration.

1

SMB_CSC_CACHE_AUTO_REINT Clients are allowed to automatically cache the files that a user or application modifies for offline use. Automatic file-by-file reintegration MUST be permitted.

2

SMB_CSC_CACHE_VDO Clients are allowed to automatically cache the files that a user or application modifies for offline use. Clients are permitted to work from their local cache even while online.

3

SMB_CSC_NO_CACHING No offline caching is allowed for this share.

SMB_UNIQUE_FILE_NAME

0x0010

0

If set, then the server is using long file names only and does not support short file names. If set, then the server allows the client to assume that there is no name aliasing for this share (in other words, a single file cannot have two different names). If set, then the server permits the client to cache directory enumerations and file metadata based on the pathname.

The client MAY<47> choose to satisfy file attribute queries from its cache and thus could present a slightly stale view of files on the share. The client MUST NOT cache remote file system information for more than 60 seconds.

1

SMB_EXTENDED_SIGNATURES

0x0020

0

If set, then the server is using signing key protection (see section 3.3.5.4), as requested by the client.

1

MaximalShareAccessRights (4 bytes): This field MUST specify the maximum rights that the user has to this share based on the security enforced by the share. This field MUST be encoded in an ACCESS_MASK format, as specified in section 2.2.1.4.

GuestMaximalShareAccessRights (4 bytes): This field MUST specify the maximum rights that the guest account has on this share based on the security enforced by the share. Note that the notion of a guest account is implementation specific.<48>

Implementations that do not support the notion of a guest account MUST set this field to zero, which implies no access. This field MUST be encoded in an ACCESS_MASK format, as specified in section 2.2.1.4.