none
MS-SMB correction to the SMB_QUERY_ALL_INFO info level RRS feed

  • Question



  • Hi all,

    I noticed that the MS-SMB document does not correct the specification of the SMB_QUERY_FILE_ALL_INFO response found in <http://www.microsoft.com/about/legal/intellectualproperty/protocols/BSTD/CIFS/draft-leach-cifs-v1-spec-02.txt>. Both the Leach drafts and the SNIA CIFS doc have always got this wrong causing confusion and interoperability problems with new SMB implementations.


    The correct format is:


    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 bytes 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



    cheers,
    James
    Wednesday, June 18, 2008 5:39 PM

Answers

  •  

    Hi James,

     

    We’ve concluded our investigation and upcoming versions of the document will reflect changes similar to the following:

     

    2.2.13.2 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
    0

    1

    CreationTime

    ...

    LastAccessTime

    ...

    LastWriteTime

    ...

    ChangeTime

    ...

    Attributes

    AllocationSize

    ...

    EndofFile

    ...

    NumberOfLinks

    DeletePending

    Directory

    Pad

    EASize

    ...

    FileNameLength

    ...

    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 2.2.13.4.

    The FILE_ALL_INFORMATION structure described in [MS-FSCC], is NOT used by [MS-SMB].

    Thanks for your help!


    SEBASTIAN CANEVARI - MSFT SEE Protocol Documentation Team
    • Proposed as answer by Sebastian Canevari Thursday, July 24, 2008 11:33 PM
    • Marked as answer by KeithHa Thursday, September 4, 2008 9:37 PM
    Thursday, July 24, 2008 11:33 PM
  • Hi James,

    Confirmed, it was a typo.

    It will be corrected in the upcoming versions.

    Thanks for your follow up!

    Regards,
    SEBASTIAN CANEVARI


    SEBASTIAN CANEVARI - MSFT SEE Protocol Documentation Team
    • Marked as answer by James Peach Wednesday, August 20, 2008 4:35 AM
    Thursday, August 7, 2008 3:12 PM

All replies

  •  

    Thank you for your posting James, we will review your question and post the answer as soon as our investigation is complete.

     




    SEBASTIAN CANEVARI - MSFT

    Thursday, June 19, 2008 2:04 PM
  • Sory about the wonky formatting, see <http://lists.samba.org/archive/cifs-protocol/2008-June/000158.html> for something more legible
    Thursday, June 19, 2008 3:57 PM
  •  

    Hi James,

     

    We’ve concluded our investigation and upcoming versions of the document will reflect changes similar to the following:

     

    2.2.13.2 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
    0

    1

    CreationTime

    ...

    LastAccessTime

    ...

    LastWriteTime

    ...

    ChangeTime

    ...

    Attributes

    AllocationSize

    ...

    EndofFile

    ...

    NumberOfLinks

    DeletePending

    Directory

    Pad

    EASize

    ...

    FileNameLength

    ...

    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 2.2.13.4.

    The FILE_ALL_INFORMATION structure described in [MS-FSCC], is NOT used by [MS-SMB].

    Thanks for your help!


    SEBASTIAN CANEVARI - MSFT SEE Protocol Documentation Team
    • Proposed as answer by Sebastian Canevari Thursday, July 24, 2008 11:33 PM
    • Marked as answer by KeithHa Thursday, September 4, 2008 9:37 PM
    Thursday, July 24, 2008 11:33 PM
  • Hi Sebastian,

    The DeletePending and Directory fields should be 1 byte each (not 2 bytes each as you have here). The Mac OS X 10.5 client uses this call and successfully accesses the FileName field, so it must be right :)

    James

    James Peach
    Wednesday, July 30, 2008 8:05 PM
  • Hi James,
     
    Thanks for the heads up!

    I've submitted the comment to the doc owners and I'm waiting on their response.

    Thanks and regards,


    SEBASTIAN CANEVARI

    SEBASTIAN CANEVARI - MSFT SEE Protocol Documentation Team
    Thursday, July 31, 2008 9:20 PM
  • Hi James,

    Confirmed, it was a typo.

    It will be corrected in the upcoming versions.

    Thanks for your follow up!

    Regards,
    SEBASTIAN CANEVARI


    SEBASTIAN CANEVARI - MSFT SEE Protocol Documentation Team
    • Marked as answer by James Peach Wednesday, August 20, 2008 4:35 AM
    Thursday, August 7, 2008 3:12 PM
  • Thanks Sebastian
    James Peach
    Wednesday, August 20, 2008 4:35 AM