mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 16:43:05 -05:00
`setuid`, `setreuid` and `setgroups` are absent imports of XPSemu (PPSA97358) and PS5MC (PPSA99420) on `main`. The guest process is modelled as root with ids 0, as `seteuid` and `setegid` already assume: `setuid` accepts 0 and `setreuid` 0 or -1 per id and change nothing, any other id throws. `setgroups` keeps the supplementary group list as FreeBSD's `kern_setgroups` does (`NGROUPS_MAX` 1023, an empty list leaves the effective group as the only entry, a first entry other than 0 throws) and the new `getgroups` reports it. `guest_credentials` covers the accepted ids, the default list, a set list, an empty list and the EINVAL/EFAULT cases. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit d12b062074dcf64bff694800d77f7261adf6f59e)