feat(libkernel): export credential setters and supplementary groups #3893

Merged
MarcZX10 merged 2 commits from upstream-pr/3893 into main 2026-10-12 13:31:37 +00:00
MarcZX10 commented 2026-10-11 18:56:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T18:56:45Z.


What

Carries the ready implementation from issue #3862, preserving Mouad-Scriptz-0’s original commit author. Adds setuid, setreuid, setgroups, and getgroups under the existing guest-root identity model, with explicit errors or throws for credential changes the emulator does not model. The PR also keeps the existing seteuid/setegid regression checks and extends them with the new cases.

Tested

Linux, GCC 12.2, Release, Ninja 1.11.1: built guest_credentials_tests; ctest -R ^guest_credentials$ --output-on-failure passed 1/1. tools/check_conventions.py --base upstream/main and git diff --check upstream/main...HEAD passed. The issue author’s catalog import audit is reported in #3862; the titles were not run.

Checklist

  • Based on current main; no other open PR implements these functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behavior, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4821501490 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3893). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T18:56:45Z. --- ### What Carries the ready implementation from issue #3862, preserving Mouad-Scriptz-0’s original commit author. Adds `setuid`, `setreuid`, `setgroups`, and `getgroups` under the existing guest-root identity model, with explicit errors or throws for credential changes the emulator does not model. The PR also keeps the existing `seteuid`/`setegid` regression checks and extends them with the new cases. ### Tested Linux, GCC 12.2, Release, Ninja 1.11.1: built `guest_credentials_tests`; `ctest -R ^guest_credentials$ --output-on-failure` passed 1/1. `tools/check_conventions.py --base upstream/main` and `git diff --check upstream/main...HEAD` passed. The issue author’s catalog import audit is reported in #3862; the titles were not run. ### Checklist - [x] Based on current `main`; no other open PR implements these functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behavior, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-11 18:57:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T18:57:05Z.


Progress report (a11c8f7 → b6f96f8)

📈 System libraries: 85.83% (+0.02%, +4 implemented functions)

✅ 4 implemented
Library Name
libkernel getgroups_nid_postfix
libkernel setgroups_nid_postfix
libkernel setreuid_nid_postfix
libkernel setuid_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6112520799 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3893#issuecomment-6112520799). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T18:57:05Z. --- <!-- progress-report --> ### Progress report (a11c8f7 → b6f96f8) 📈 **System libraries**: 85.83% (+0.02%, +4 implemented functions) <details> <summary>✅ 4 implemented</summary> | Library | Name | | - | - | | libkernel | `getgroups_nid_postfix` | | libkernel | `setgroups_nid_postfix` | | libkernel | `setreuid_nid_postfix` | | libkernel | `setuid_nid_postfix` | </details>
Mouad-Scriptz-0 commented 2026-10-11 22:09:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Mouad-Scriptz-0 on 2026-10-11T22:09:33Z.


Thanks for carrying it. Linux results for the branch's commit (d12b0620, the same code as bc5bfd0e): Fedora 44 (kernel 7.2.8, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON), guest_credentials, guest_truncate and guest_pthread_attr pass; tools/check_conventions.py --base origin/main and git diff --check pass. The import audit from #3862 (catalog ZIPs checked against their sha256, SELF unwrapped, relinker --registry, tools/import_audit.py against .prx built from main and from the branch): PPSA97358 XPSemu goes from 34 to 32 absent imports (setuid, setgroups), PPSA99420 PS5MC from 28 to 25 (setuid, setreuid, setgroups). The titles were not run.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114399166 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3893#issuecomment-6114399166). Originally posted by [Mouad-Scriptz-0](https://github.com/Mouad-Scriptz-0) on 2026-10-11T22:09:33Z. --- Thanks for carrying it. Linux results for the branch's commit (`d12b0620`, the same code as `bc5bfd0e`): Fedora 44 (kernel 7.2.8, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`), `guest_credentials`, `guest_truncate` and `guest_pthread_attr` pass; `tools/check_conventions.py --base origin/main` and `git diff --check` pass. The import audit from #3862 (catalog ZIPs checked against their sha256, SELF unwrapped, `relinker --registry`, `tools/import_audit.py` against `.prx` built from `main` and from the branch): PPSA97358 XPSemu goes from 34 to 32 absent imports (`setuid`, `setgroups`), PPSA99420 PS5MC from 28 to 25 (`setuid`, `setreuid`, `setgroups`). The titles were not run. AI-assisted: yes (Claude Code).
github-actions[bot] commented 2026-10-12 13:34:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T13:34:43Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#4411 docs/dev/TechnicalDebt.md L61-262
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6125357496 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3893#issuecomment-6125357496). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T13:34:43Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #4411 | `docs/dev/TechnicalDebt.md` [L61-262](https://github.com/boykopovar/AnyPS5/blob/a1a9c3db593ff0a03f3a337d6e70974a1032cb3c/docs/dev/TechnicalDebt.md#L61-L262) | | |
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3893
No description provided.