[cifs-protocol] correction to SMB SMB_QUERY_FILE_ALL_INFO info
Sebastian.Canevari at microsoft.com
Thu Jul 24 23:32:25 GMT 2008
We've concluded our investigation and upcoming versions of the document will reflect changes similar to the following:
18.104.22.168 TRANS2_QUERY_FILE_INFORMATION Response
A server MUST send a TRANS2_QUERY_FILE_INFORMATION response in reply to an SMB_COM_TRANSACTION2 client request with a TRANS2_QUERY_FILE_INFORMATION subcommand when the request is successful.
The Data block of the transaction response contains the requested information as follows. Note that this Data block definition augments the definition specified in [CIFS] section 4.2.15. Where differences exist, the information supplied here supercedes information in [CIFS].
This structure is returned by the server whether the query specifies SMB_QUERY_FILE_ALL_INFO level or the native NT passthrough level "FileAllInformation".
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
... FileName (variable)
CreationTime (8 bytes): Time of the file creation.
LastAccessTime (8 bytes): Time of the most recent file access.
LastWriteTime (8 bytes): Time of the most recent write in the file.
ChangeTime (8 bytes): Time of the most recent change to the file.
Attributes (4 bytes): File attributes.
AllocationSize (8 bytes): Allocated size, in bytes, of the file.
EndofFile (8 bytes): Offset to the first free byte in the file.
NumberOfLinks (4 bytes): Number of hard links to the file.
DeletePending (2 bytes): Indicates whether the file is marked for deletion.
Directory (2 bytes): Indicates whether the file is a directory.
Pad (2 bytes): Unused. Provided for alignment.
EASize (4 bytes): Size, in bytes, of the file's extended attributes.
FileNameLength (4 bytes): Length, in bytes, of the file name.
FileName (variable): Name of the file.
This structure is also returned by the TRANS2_QUERY_PATH_INFORMATION Response as specified in section 22.214.171.124.
The FILE_ALL_INFORMATION structure described in [MS-FSCC], is NOT used by [MS-SMB].
Thanks for your help!
I'm attaching a .pdf doc so you can see the answer with the correct format.
Support Escalation Engineer, US-CSS DSC PROTOCOL TEAM
7100 N Hwy 161, Irving, TX - 75039
"Las Colinas - LC2"
Tel: +1 469 775 7849
e-mail: sebastc at microsoft.com
From: cifs-protocol-bounces+sebastc=microsoft.com at cifs.org [mailto:cifs-protocol-bounces+sebastc=microsoft.com at cifs.org] On Behalf Of James Peach
Sent: Thursday, June 19, 2008 10:55 AM
To: cifs-protocol at samba.org
Subject: [cifs-protocol] correction to SMB SMB_QUERY_FILE_ALL_INFO info level
Just posting this note so that there is something searchable on the web.
The SMB_QUERY_FILE_ALL_INFO info level has been specified incorrectly
as far back as the Leach-Naik drafts. The correct format for this
Data Block Encoding Description
LARGE_INTEGER CreationTime Time when file was created
LARGE_INTEGER LastAccessTime Time of last file access
LARGE_INTEGER LastWriteTime Time of last write to the file
LARGE_INTEGER ChangeTime Time when file was last changed
ULONG Attributes File Attributes
LARGE_INTEGER AllocationSize Allocated size of the file in number of
LARGE_INTEGER EndofFile Offset to the first free byte in the file
ULONG NumberOfLinks Number of hard links to the file
BOOLEAN DeletePending Indicates whether the file is marked for deletion
BOOLEAN Directory Indicates whether the file is a directory
USHORT Unknown Could be a padd value?
ULONG EASize Size of the file's extended attributes in bytes
ULONG FileNameLength Length of the file name in number of bytes
STRING FileName Name of the file
All versions of Windows and Samba get this right. AFAIK the only
modern SMB client that uses this info level is the Mac OSX client. I
believe that some versions of NetApp filers get this wrong. Wireshark
used to get this wrong, but recent versions get it right.
I posted this on the MSDN File Services forum, but it ate my
formatting. Hopefully this is more legible :)
cifs-protocol mailing list
cifs-protocol at cifs.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 195896 bytes
Url : http://lists.samba.org/archive/cifs-protocol/attachments/20080724/4b1d5f7d/JAmes-0001.pdf
More information about the cifs-protocol