Clarification on handling reparse points vs. symbolic links in MS-SMB2 Create Requests

Tom Sasson 20 Reputation points
2025-06-03T12:45:25.76+00:00

Hello,

I am reviewing the [MS-SMB2] protocol documentation and have encountered what appears to be a contradiction regarding how the server should handle reparse points and symbolic links during a CREATE request.


Relevant Sections from the Specification:

  1. Section 2.2.14 (SMB2_CREATE_FLAG_REPARSEPOINT)

ValueMeaningSMB2_CREATE_FLAG_REPARSEPOINTWhen set, indicates the last portion of the file path is a reparse point. This MUST be used when the last component of a file opened is a reparse point, and the create request CreateOptions do not contain FILE_OPEN_REPARSE_POINT.0x01 1. Section 3.3.5.9 (Handling of Symbolic Links)

“If any intermediate component of the path specified in the create request is a symbolic link, the server MUST return an error as specified in section 2.2.2.2.1. Symbolic links MUST NOT be evaluated by the server. If the final component of the path is a symbolic link, the server behavior depends on whether the flag FILE_OPEN_REPARSE_POINT was specified in the CreateOptions field of the request. If FILE_OPEN_REPARSE_POINT was specified, the server MUST open the underlying file or directory and return a handle to it. Otherwise, the server MUST return an error as specified in section 2.2.2.2.1.”


Observed Contradiction:

  • From Section 2.2.14, it seems that when the last component of the path is a reparse point and the CreateOptions do not include FILE_OPEN_REPARSE_POINT, the server is supposed to set the SMB2_CREATE_FLAG_REPARSEPOINT flag (0x01) in the request. In other words, the server should accept the request and recognize that the final component is a reparse point.
  • However, Section 3.3.5.9 states that if the final component of the path is a symbolic link and the FILE_OPEN_REPARSE_POINT flag is not present in the CreateOptions, the server must return an error (per section 2.2.2.2.1).

Since symbolic links are a specific type of reparse point, this raises the folowing:

Questions:

  1. If a client omits FILE_OPEN_REPARSE_POINT in CreateOptions when opening a final-component reparse point, does the server still accept the request and sets SMB2_CREATE_FLAG_REPARSEPOINT (section 2.2.14)? Or must the server immediately return an error (section 3.3.5.9)?
  2. In either case, I would be happy for an example.

Thank you for your time,
Tom

Windows development | Windows Open Specifications
{count} votes

Accepted answer
  1. Obaid Farooqi MSFT 761 Reputation points Microsoft Employee Moderator
    2025-06-04T19:41:22.0266667+00:00

    Hi Tom:

    Please see the answers to your questions in a Q&A fashion as follows:

    Q: If a client omits FILE_OPEN_REPARSE_POINT in CreateOptions when opening a final-component reparse point, does the server still accept the request and sets SMB2_CREATE_FLAG_REPARSEPOINT (section 2.2.14)? Or must the server immediately return an error (section 3.3.5.9)?

    A: SMB server (mentioned generally as server in MS-SMB2) is a separate entity from object store. Object store is the entity that has the knowledge if a component of the path client is trying to open (create) is a symbolic link or not. Server just passes the path to the object store. Object store opens the file and returns the handle and extra create parameters (ECP) to the server. If ECP indicates that the file that was open was actually the target of the reparse point, the server sets SMB2_CREATE_FLAG_REPARSEPOINT in the create response.

    If a client sets FILE_OPEN_REPARSE_POINT in the create request, server knows that client does not want to open the target of the reparse point but the reparse point itself.

    If a component of the path that is not the last component of the path happens to be a symbolic link, the object store returns error STATUS_STOPPED_ON_SYMLINK. The server then returns the error to the client with additional data that will allow the client to open the file since, as mentioned in <6> Section 2.2.2.2.1, Windows-based servers will never follow a symlink. It is the client's responsibility to evaluate the symlink and access the actual file using the symlink.

    Please refer to MS-SMB2 glossary section to learn more about symbolic links and reparse points.

    Q2: In either case, I would be happy for an example.

    A: Please provide more details as to what kind of an example you’re looking for.

    Regards,

    Obaid Farooqi - MSFT

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.