From 4f07b26f5e355098b5473e5da79ec9014cf1c68e Mon Sep 17 00:00:00 2001 From: mptyl Date: Tue, 18 Aug 2026 13:03:20 +0200 Subject: [PATCH] fix(safeio): pass valid NT file attributes --- tools/tht/internal/safeio/private_root_windows.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/tht/internal/safeio/private_root_windows.go b/tools/tht/internal/safeio/private_root_windows.go index abde8098..1d6d9af2 100644 --- a/tools/tht/internal/safeio/private_root_windows.go +++ b/tools/tht/internal/safeio/private_root_windows.go @@ -203,7 +203,11 @@ func openWindowsRelativeObjectWithShareMode( attributes, &status, &allocationSize, - windows.FILE_ATTRIBUTE_NORMAL, + // NtCreateFile expects zero here for the retained open/create contract. The + // Win32 FILE_ATTRIBUTE_NORMAL flag is not a valid NT FileAttributes value + // for this RootDirectory-relative call and produces STATUS_INVALID_PARAMETER + // on the Windows runner. + 0, shareMode, disposition, options,