Skip to content

FileTrust test hard-codes the English name of LOCAL SERVICE and fails on non-English Windows #1733

Open

Description

@christianparpart

Problem

src/Pace/Platform/FileTrust_test.cpp:1178 passes the literal account name NT AUTHORITY\LOCAL SERVICE to SecureDirectoryForService. Windows localizes the names of its well-known accounts. On a host with a German system locale (de-DE) the same account is NT-AUTORITÄT\Lokaler Dienst. The lookup fails with error 1332 (ERROR_NONE_MAPPED) and the case "FileTrust: a foreign-owned entry is refused with the deletion remedy" fails with three CHECKs:

FileTrust_test.cpp(1181): FAILED: CHECK( secured.error().contains(key.string()) )
  with expansion: the account 'NT AUTHORITY\LOCAL SERVICE' did not resolve (error 1332)

Verified on 2026-10-28 on a Windows 11 host with system locale de-DE:
(New-Object System.Security.Principal.SecurityIdentifier("S-1-5-19")).Translate([System.Security.Principal.NTAccount]) → NT-AUTORITÄT\Lokaler Dienst.

The literal appears only in the test. No production code under src/ contains it.

Fix

Resolve the account by its well-known SID, S-1-5-19 (LOCAL SERVICE), and pass the localized name the system returns, or a SID-based form if SecureDirectoryForService accepts one. Do not compare against an English literal.

Acceptance

The case passes on an en-US host and on a de-DE host.

Activity

  1. added
    type/testCoverage gaps, flaky or unbuilt test targets, e2e fixtures
    os/windowsSpecific to Windows (MSVC, clang-cl, Winsock, IOCP)
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    os/windowsSpecific to Windows (MSVC, clang-cl, Winsock, IOCP)status/needs-triageNot yet typed or assigned an areatype/testCoverage gaps, flaky or unbuilt test targets, e2e fixtures

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions