From 58a4b917799fd7bea2b104459203a5ca997742e8 Mon Sep 17 00:00:00 2001 From: alex-the-third <139810351+alex-the-third@users.noreply.github.com> Date: Thu, 2 Jul 2026 19:43:19 +0200 Subject: [PATCH 1/2] fix: use locale-neutral Windows ACL for build data On localized Windows installs, resolving the English Everyone principal can fail when build_data_writer.ps1 creates the output file ACL. This breaks build data generation on systems such as German Windows. Use the language-neutral WorldSid identity instead, preserving the existing Everyone read permission without depending on localized account names. --- news/3886.fixed.md | 1 + python/private/build_data_writer.ps1 | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 news/3886.fixed.md diff --git a/news/3886.fixed.md b/news/3886.fixed.md new file mode 100644 index 0000000000..2285813f8b --- /dev/null +++ b/news/3886.fixed.md @@ -0,0 +1 @@ +(windows) Fixed build data generation on localized Windows installations. diff --git a/python/private/build_data_writer.ps1 b/python/private/build_data_writer.ps1 index 0074e69d38..6b29290fba 100644 --- a/python/private/build_data_writer.ps1 +++ b/python/private/build_data_writer.ps1 @@ -21,7 +21,15 @@ $Utf8NoBom = New-Object System.Text.UTF8Encoding $False [System.IO.File]::WriteAllLines($OutputPath, $Lines, $Utf8NoBom) $Acl = Get-Acl $OutputPath -$AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule("Everyone", "Read", "Allow") +$EveryoneSid = New-Object System.Security.Principal.SecurityIdentifier( + [System.Security.Principal.WellKnownSidType]::WorldSid, + $null +) +$AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule( + $EveryoneSid, + "Read", + "Allow" +) $Acl.SetAccessRule($AccessRule) Set-Acl $OutputPath $Acl From 58ad8c8312d84699caf82bfae0a89dec8e8f331d Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Thu, 2 Jul 2026 18:32:59 +0000 Subject: [PATCH 2/2] doc: Add comment explaining WorldSid usage in build_data_writer.ps1 We use WorldSid because the 'Everyone' name is locale-dependent. --- python/private/build_data_writer.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/python/private/build_data_writer.ps1 b/python/private/build_data_writer.ps1 index 6b29290fba..05c49fef9c 100644 --- a/python/private/build_data_writer.ps1 +++ b/python/private/build_data_writer.ps1 @@ -21,6 +21,7 @@ $Utf8NoBom = New-Object System.Text.UTF8Encoding $False [System.IO.File]::WriteAllLines($OutputPath, $Lines, $Utf8NoBom) $Acl = Get-Acl $OutputPath +# We use WorldSid because the "Everyone" name is locale-dependent. $EveryoneSid = New-Object System.Security.Principal.SecurityIdentifier( [System.Security.Principal.WellKnownSidType]::WorldSid, $null