Add SMB2 QUERY_INFO Request
authorDavid Mulder <dmulder@samba.org>
Thu, 22 Sep 2022 15:36:36 +0000 (09:36 -0600)
committerDavid Mulder <dmulder@samba.org>
Thu, 22 Sep 2022 15:36:36 +0000 (09:36 -0600)
Signed-off-by: David Mulder <dmulder@samba.org>
smb3_posix_extensions.md

index 7a1ea3f74ba6b3ed9d4fd9d4e9ef17a1e5af1b88..63fcd9f654068c70314e8d1c0b1aa589df7bdf39 100644 (file)
@@ -1051,4 +1051,168 @@ of IEEE Std 1003.1-2017.
 **Filename (variable):** A variable-length buffer containing the filename, the
 length specified by **FilenameLength**.
 
+### 2.2.37 SMB2 QUERY_INFO Request
+
+Refer to section
+[2.2.37](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/d623b2f7-a5cd-4639-8cc9-71fa7d9f9ba9)
+of \[MS-SMB2\] for additional details. This section
+only explains details relevant to a SMB2_FIND_POSIX_INFORMATION request.
+
+<table>
+ <tr>
+  <th><p><br>0</p></th>
+  <th><p><br>1</p></th>
+  <th><p><br>2</p></th>
+  <th><p><br>3</p></th>
+  <th><p><br>4</p></th>
+  <th><p><br>5</p></th>
+  <th><p><br>6</p></th>
+  <th><p><br>7</p></th>
+  <th><p><br>8</p></th>
+  <th><p><br>9</p></th>
+  <th><p>1<br>0</p></th>
+  <th><p><br>1</p></th>
+  <th><p><br>2</p></th>
+  <th><p><br>3</p></th>
+  <th><p><br>4</p></th>
+  <th><p><br>5</p></th>
+  <th><p><br>6</p></th>
+  <th><p><br>7</p></th>
+  <th><p><br>8</p></th>
+  <th><p><br>9</p></th>
+  <th><p>2<br>0</p></th>
+  <th><p><br>1</p></th>
+  <th><p><br>2</p></th>
+  <th><p><br>3</p></th>
+  <th><p><br>4</p></th>
+  <th><p><br>5</p></th>
+  <th><p><br>6</p></th>
+  <th><p><br>7</p></th>
+  <th><p><br>8</p></th>
+  <th><p><br>9</p></th>
+  <th><p>3<br>0</p></th>
+  <th><p><br>1</p></th>
+ </tr>
+ <tr>
+  <td colspan="16">
+  <p>StructureSize</p>
+  </td>
+  <td colspan="8">
+  <p>InfoType</p>
+  </td>
+  <td colspan="8">
+  <p>FileInfoClass</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="32">
+  <p>OutputBufferLength</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="16">
+  <p>InputBufferOffset</p>
+  </td>
+  <td colspan="16">
+  <p>Reserved</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="32">
+  <p>InputBufferLength</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="32">
+  <p>AdditionalInformation</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="32">
+  <p>Flags</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="32">
+  <p>FileId</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="32">
+  <p>...</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="32">
+  <p>...</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="32">
+  <p>...</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="32">
+  <p>Buffer
+  (variable)</p>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="32">
+  <p>...</p>
+  </td>
+ </tr>
+</table>
+
+**StructureSize (2 bytes):** The client MUST set this field to 41, 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 queried. This field MUST contain
+one of the values specified in section
+[2.2.37](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/d623b2f7-a5cd-4639-8cc9-71fa7d9f9ba9)
+of \[MS-SMB2\].
+
+**FileInfoClass (1 byte):** For file information queries, this field MUST
+contain one of the following FILE_INFORMATION_CLASS values, as specified in
+section
+[3.3.5.20.1](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/d64e0451-64a2-425a-848e-52a7dddab7b9)
+of \[MS-SMB2\] and in \[MS-FSCC\] section
+[2.4](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/4718fc40-e539-4014-8e33-b675af74e3e1)
+, or the following extension defined in section
+[2.2.34.1](#2.2.34.1-FilePosixInformation):
+
+* FilePosixInformation
+
+**OutputBufferLength (4 bytes):** The maximum number of bytes of information the
+server can send in the response.
+
+**InputBufferOffset (2 bytes):** The offset, in bytes, from the beginning of the
+SMB2 header to the input buffer.
+
+**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.
+
+**InputBufferLength (4 bytes):** The length of the input buffer.
+
+**AdditionalInformation (4 bytes):** Provides additional information to the
+server.
+
+**Flags (4 bytes):** The flags MUST be set to a combination of zero or more of
+the bit values defined in section
+[2.2.37](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/d623b2f7-a5cd-4639-8cc9-71fa7d9f9ba9)
+for a FileFullEaInformation query.
+
+**FileId (16 bytes):** An
+[SMB2_FILEID](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/f1d9b40d-e335-45fc-9d0b-199a31ede4c3)
+identifier of the file or named pipe on which to perform the query. Queries for
+underlying object store or quota information are directed to the volume on which
+the file resides.
+
+**Buffer (variable):** A variable-length buffer containing the input buffer for
+the request, as described by the **InputBufferOffset** and **InputBufferLength**
+fields.
+
 # 3 Protocol Details
\ No newline at end of file