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