feat(libkernel): implement setresuid and setresgid #9218
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9218"
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?
Imported from boykopovar/AnyPS5. Originally posted by slopgobblercobbler on 2026-10-21T15:28:58Z.
What
Implement
setresuid_nid_postfixandsetresgid_nid_postfix(FreeBSD syscalls 311 and 312) incore/libs/prx/libkernel/System/src/Process.cpp, test them inGuestCredentials.cpp, and updatedocs/dev/debt/libkernel.md.Why
FreeBSD 11.4 provides
setresuidandsetresgid(sys/kern/kern_prot.c) to set the real, effective, and saved user and group IDs of the process.AnyPS5 models a guest environment running as root with real, effective, and saved IDs set to 0.
0xffffffffu, unchanged) is accepted without modifying credentials and returns 0.std::runtime_error.errnoleft untouched.Tested
Windows 11 x64:
core/libs/tests/GuestCredentials.cppwith unit test coverage:0xffffffffu) returning 0.errnois untouched on success.std::runtime_errorfor real, effective, and saved IDs across both user and group variants.python tools/check_conventions.py --base upstream/main --head HEAD.python tools/check_main_sync.py: HEAD is 1 ahead and 0 behind upstream/main, clean merge.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T15:29:37Z.
Progress report (
cecb540→d28c74a)📈 System libraries: 42.11% (+0.01%, +2 implemented functions)
✅ 2 implemented
setresgid_nid_postfixsetresuid_nid_postfixImported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-22T04:12:35Z.
Review: COMMENTED
Checked against main
6ef5a1c4cand FreeBSD 11.4sys_setresuid/sys_setresgid(sys/kern/kern_prot.c):sce_stubs/libkernel.c,libkernel_sys.c,libkernel_web.cat a7685ce8) nor the PS5-3.20libkernel.c/libkernel_sys.ctables listsetresuidorsetresgid, while all of them listsetreuidandsetregid. Main has no discovery stub for them either. As written,Process.cpp:773and:784add libkernel.prx NIDs that no title or SDK binary can import.BUILD_TESTING=ONbuild) merged onto main6ef5a1c4c; the only failing step is the existingImageArrayWindowPastLayerLimit.cppalignment error that #8310 fixes. Not run here: this machine's Smart App Control blocks freshly built test executables.Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.