runtime: emulate console LSA and package-family policy state in-process #32
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!32
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/32/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@figmasigma122343-bot on GitHub · 2026-11-21 18:29 UTC · original
figmasigma122343-bot:runtime/console-policy-state→main· +339 −71 · 17 files · 1 commits · closed without mergingTasks
LsaEnablePasswordLessCurrentUserandLsaDisablePasswordLessCurrentUseradvapi32PE forwarders and cover the real-name loadAddPackageToFamilyXrefandRemovePackageFromFamilyXrefGetPackageInstallTimeto the in-process package repositorygamecoreclientCOM classes (tracked by #8)What changed
Passwordless LSA policy
The console
advapi32/advapi32legacyexports are no-argumentlsarpcNdrClientCall3wrappers (opnums 0x7e and 0x7f). Calling the host LSA opnum would change the signed-in PC user's real sign-in options, so both calls now update process-localadvapi32legacy::policystate and returnSTATUS_SUCCESS.advapi32exports them as PE forwarders toadvapi32legacy, matching the console API-set resolution throughext-ms-win-advapi32-lsa-l1-1-3.KernelBase package-family xref
The console deployment internals write/delete ACL-protected keys under
HKEY_USERS\<sid>\...\AppModel\Repository\Families\<family>\<fullname>. The port keeps the sameInstallTimeqword, flags dword and reserved dword in an in-process repository, never in the signed-in user's real hive.AddPackageToFamilyXref(family, full, {InstallTime, flags, reserved})RemovePackageFromFamilyXref(family, full)GetPackageInstallTimereads the in-process repository first and only then falls back to the hostHKCUThe ABI follows the x86
_AddPackageToFamilyXref@24decoration and the x64 3-parameter symbol: two string pointers plus a 16-byte record. A missing remove returnsERROR_FILE_NOT_FOUND(2); invalid or empty names returnERROR_INVALID_PARAMETER(0x57).Before / after
The three changed library blocks, with the cells whose status changed boxed in red:
Full updated map:
Verification
Observed:
kernelbase: 7 unit tests and 3 export/forwarder tests passed.advapi32legacy: 9 unit tests and 4 export/forwarder tests passed.advapi32: 4 export/forwarder tests and 1 real-name test passed.advapi32legacyis 207/207,advapi32is 13/13,KernelBaseis 3/3.Scope and limits
kernelbase::repositoryand easy to adjust.gamecoreclient!DllGetClassObjectis already ported and tested insrc/lib.rs, but its two COM class objects are still unported. It is intentionally not flipped toimplementedin this PR because #8 requires the objects to be able to reach their peer; a class factory returningE_NOTIMPLwould be a stub, not coverage.Refs #7
@figmasigma122343-bot on GitHub · 2026-11-22 07:56 UTC · original
Closing: current main already implements both halves with the console-verified signatures. KernelBase AddPackageToFamilyXref is (PSID, PCWSTR, PCWSTR, DWORD, ULONGLONG), and advapi32legacy has src/passwordless.rs. My earlier PR used an inferred xref layout and is superseded; keeping it open would be misleading.
Pull request closed