The published documentation does not provide a complete supported contract for that exact combination.
OBJ_DONT_REPARSE is documented on OBJECT_ATTRIBUTES as a general object-attribute flag that prevents following reparse points during name parsing, but the NtCreateFile parameter page says OBJECT_ATTRIBUTES.Attributes “can be zero or OBJ_CASE_INSENSITIVE.” In the available public documentation, that leaves a documentation mismatch rather than an explicit NtCreateFile contract that fully lists OBJ_DONT_REPARSE for user-mode callers.
For user-mode NtCreateFile with:
- a non-NULL
RootDirectory - a single relative child name
-
OBJ_DONT_REPARSEinOBJECT_ATTRIBUTES.Attributes -
FILE_DIRECTORY_FILE -
FILE_OPEN - no
FILE_OPEN_REPARSE_POINT
the public documentation available here does not expressly state all of the following as a supported guarantee:
- that
OBJ_DONT_REPARSEis supported for this exact user-mode, handle-relative directory-open shape - that it applies identically to a one-component relative name
- that it blocks redirection when the final named child itself is the reparse point
- that it overrides the normal reparse processing described for opens that do not specify
FILE_OPEN_REPARSE_POINT - that
STATUS_REPARSE_POINT_ENCOUNTEREDis the guaranteed failure status for this exact configuration across supported Windows versions and file systems
What is documented:
-
NtCreateFilesupports relative naming throughRootDirectory; ifRootDirectoryis non-NULL,ObjectNameis interpreted relative to that directory handle. - If
FILE_OPEN_REPARSE_POINTis specified and a file with a reparse point is opened, normal reparse processing does not occur andNtCreateFileattempts to directly open the reparse-point file. - If
FILE_OPEN_REPARSE_POINTis not specified, normal reparse-point processing occurs. - Reparse-point support depends on the file system. NTFS and ReFS support reparse points; FAT does not.
What is not established by the available public documentation:
- an explicit statement that
OBJ_DONT_REPARSEis supported by user-modeNtCreateFilefor handle-relative opens - an explicit statement that the final path component is covered in this exact
NtCreateFilescenario - an explicit precedence rule between
OBJ_DONT_REPARSEand the documented normal reparse processing whenFILE_OPEN_REPARSE_POINTis absent - a documented, version-qualified guarantee that the failure status is
STATUS_REPARSE_POINT_ENCOUNTERED - documented user-mode versus kernel-mode differences for this exact combination
A Microsoft Q&A answer in the available material reports tested behavior on Windows 11 build 26200 that OBJ_DONT_REPARSE is honored by user-mode NtCreateFile even with a directory-relative single-component name, and that encountering a reparse point returned STATUS_REPARSE_POINT_ENCOUNTERED. That same answer also states the governing OBJECT_ATTRIBUTES text appears broader than the NtCreateFile page and treats the NtCreateFile wording as stale. However, that is implementation evidence and interpretation, not a complete published API contract.
So, for a security-sensitive design, the supported conclusion from the available documentation is:
- relative naming via
RootDirectoryis documented - normal reparse processing without
FILE_OPEN_REPARSE_POINTis documented -
OBJ_DONT_REPARSEexists as a documented object-attribute flag - but the exact user-mode
NtCreateFilecombination and the requested leaf-component security guarantee are not fully established by the available public documentation
References: