Dear Microsoft Windows Developer Support Team,
We are designing a local Windows service architecture that requires secure creation of a new directory inside an existing, verified filesystem directory.
Our target environment is Windows 11 Home 26H2, x64, build 26300.9974.
Before implementing the provisioning mechanism, we need clarification regarding the supported security contract for user-mode NtCreateFile.
Our intended design requires:
Creating a new directory using a single relative name and an already validated filesystem directory handle supplied through OBJECT_ATTRIBUTES.RootDirectory.
Using FILE_CREATE and FILE_DIRECTORY_FILE so that an existing file, directory, symbolic link or junction cannot be silently adopted.
Applying an explicit, protected security descriptor during creation.
Rejecting unapproved filesystem reparse points before any mutation outside the authorized parent.
Receiving an handle to the newly created directory and maintaining protection against unauthorized rename or movement from the moment of creation.
We would appreciate clarification on three questions.
Question 1 — OBJ_DONT_REPARSE
Is OBJ_DONT_REPARSE officially supported and guaranteed for user-mode NtCreateFile when RootDirectory refers to an existing filesystem directory handle and ObjectName contains a single relative component?
Does the guarantee cover filesystem junctions, symbolic links and other reparse points encountered during this operation?
Question 2 — Creation and mutation ordering
With FILE_CREATE | FILE_DIRECTORY_FILE, can the operation be guaranteed to fail before following an unexpected reparse destination or modifying an object outside the validated parent?
What restrictions apply to Windows versions, filesystems, filter drivers and security contexts?
Question 3 — Continuous protection of the created directory
Which documented combination of DesiredAccess and ShareAccess should be requested during creation to prevent another process from renaming or moving the newly created directory before its security descriptor and identity have been verified?
We are specifically interested in obtaining the required protection through the original creation handle, rather than opening a second handle after creation.
If these guarantees are not available through the proposed API combination, please identify the recommended, supported Windows API or provisioning architecture.
We are looking for an authoritative, documented security contract rather than behavior observed only on a particular Windows build.
No production deployment has been authorized while these questions remain unresolved.
Thank you for your assistance.