feat(libkernel): implement setgid #7940
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7940"
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 pushkarreddyy on 2026-10-19T15:12:26Z.
What
Implement
setgid_nid_postfix(FreeBSD syscall 181, NIDfqFN+ydTbT0) inlibkernelto complete POSIX process credential parity alongside existingsetuid,seteuid,setegid,setreuid, andsetregidexports.As with its sibling
setuid, AnyPS5 models the single-process guest environment with root privileges (real, effective, and saved ids 0). Id 0 is accepted without changing credentials and returns 0; any non-zero group id throwsstd::runtime_error("setgid: unsupported group id ...").Update
docs/dev/debt/libkernel.mdunder# Process credentialsto document thesetgidroot assumption.Tested
Windows 11 x64, WinLibs MinGW-w64 GCC 15.2.0, Release:
core/libs/tests/GuestCredentials.cppassertions verifying:setgid_nid_postfix(0) == 0std::runtime_errorwhen passed unsupported non-zero group ID (1000)std::runtime_errorwhen passedUnchanged(0xffffffffu, which is only accepted bysetregid)python tools/check_conventions.py --base origin/mainpassed with 0 findings and 0 errors.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 repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T15:13:16Z.
Progress report (
00d7e61→a1b6caa)📈 System libraries: 79.75% (+0.01%, +1 implemented functions)
✅ 1 implemented
setgid_nid_postfixImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T15:17:38Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libkernel/System/src/Process.cppdocs/dev/debt/libkernel.mdcore/libs/tests/GuestCredentials.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/System/src/Process.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/System/src/Process.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.md