[cifs-protocol] Create Context SMB2_CREATE_QUERY_ON_DISK_ID payload
jra at samba.org
Thu Nov 14 19:53:32 UTC 2019
On Thu, Nov 14, 2019 at 07:05:20PM +0100, Aurélien Aptel via cifs-protocol wrote:
> There is a create context SMB2_CREATE_QUERY_ON_DISK_ID that MS-SMB2
> describes as, for the request:
> The client is requesting that the server return a 32-
> byte opaque BLOB that uniquely identifies the file
> being opened on disk. No data is passed to the
> server by the client.
> for the response:
> The server returned DiskID of the open file in a volume.
> SMB2_CREATE_CONTEXT Response takes the same
> form as defined in section 220.127.116.11.
> So on one side it reads "32-byte opaque blob" but on the other
> "DiskID". I could not find a reference to what is a DiskId.
> After some testing Windows Server seems to return the persistent file id
> + something, which Samba does as well, with the following note:
> /* From conversations with Microsoft engineers at
> the MS plugfest. The first 8 bytes are the "volume index"
> == inode, the second 8 bytes are the "volume id",
> == dev. This will be updated in the SMB2 doc. */
> Samba returns
> - file id (8 bytes)
> - device id (4 bytes)
> - padded to 32 bytes with garbage
FYI the padding is with zeros, not garbage.
This is important so as to not leak server memory.
Just wanted to be clear.
More information about the cifs-protocol