libkernel: setuid, setreuid and setgroups are absent imports of XPSemu and PS5MC; fix branch ready #3862
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Mouad-Scriptz-0 on 2026-10-11T18:07:06Z.
libkernel exports
getuid,geteuid,getgid,getegid,seteuidandsetegidbut not the POSIX credential setterssetuid(JVmUZwK-HJU),setreuid(6w8tPp+Yk6E) andsetgroups(M8VZ3iIlmyg), norgetgroups(3yjZbSvan2g), named withtools/nid_names.pyagainst aerolib. An import audit of the homebrew catalog onmaina11c8f7f(Linux,.prxbuilt frommain) lists them as absent imports of two titles:mainsetuid,setgroupssetuid,setreuid,setgroupsTheir other absent imports are covered by open pull requests (#3494, #3580, #3568, #3606, #3787, #3781, #3694 and others), so these three were the ones left with no branch. No open PR adds them (
tools/pr_overlap.py --branchreports no overlap; the open PR titles were also searched for the four names).Fix branch ready:
Mouad-Scriptz-0:feat/libkernel-credential-setters(d12b0620, one commit onmaina11c8f7f). #3738 is my one open pull request, so I cannot open this as a PR until it is decided; anyone eligible is welcome to carry it, keeping the commit as is.seteuid/setegidalready use inProcess.cppand TechnicalDebt (the guest process runs as root with real, effective and saved ids 0):setuid(0)returns 0 like FreeBSD'ssys_setuidfor an id equal to the current ones,setreuidaccepts 0 or -1 (unchanged) per id, and any other id would change a credential, which is not modelled, and throws.setgroups(count, groups)keeps the supplementary group list askern_setgroupsdoes:EINVALaboveNGROUPS_MAX(1023) or below 0,EFAULTfor a null list with a count, an empty list leaves the effective group as the only entry, and a first entry other than 0 would change the effective group (FreeBSD keeps it incr_groups[0]) and throws.getgroups(capacity, groups)reports the list assys_getgroupsdoes: the count for capacity 0,EINVALfor a smaller capacity,EFAULTfor a null list.guest_credentials(new) covers the accepted ids, the default list (the effective group 0), a set list read back throughgetgroups, an empty list, and theEINVAL/EFAULTcases of both functions. The TechnicalDebt entry forseteuid/setegidnow names the four functions and the group list.Tested on Fedora 44 (kernel 7.2.8, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON):guest_credentials,guest_truncateandguest_pthread_attrpass;tools/check_conventions.py --base origin/mainandgit diff --checkpass. Table method: catalog release ZIPs checked against their sha256,eboot.binand bundled modules unwrapped from their SELF containers,relinker --registry,tools/import_audit.pyagainst.prxfiles built frommainand from the branch. The titles were not run. Not tested on Windows.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by jagrat04 on 2026-10-12T15:28:59Z.
This was resolved and merged into
mainvia PR #3893 (commit d12b06207 /bc5bfd0ed). This issue can be closed.Imported from boykopovar/AnyPS5. Originally posted by Mouad-Scriptz-0 on 2026-10-12T16:15:11Z.
Confirmed: setuid, setreuid and setgroups are on main through #3893 (MarcZX100). The fix branch in the title is superseded; closing.