1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:17:35 +00:00

Kernel+LibC: Implement setregid(2)

This copies and adapts the setresgid syscall, following in the footsteps
of setreuid and setresuid.
This commit is contained in:
sin-ack 2022-10-01 12:47:38 +00:00 committed by Andrew Kaster
parent 2a502fe232
commit 70337f3a4b
5 changed files with 43 additions and 0 deletions

View file

@ -790,6 +790,12 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid)
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int setregid(gid_t rgid, gid_t egid)
{
int rc = syscall(SC_setresgid, rgid, egid);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int setresgid(gid_t rgid, gid_t egid, gid_t sgid)
{
int rc = syscall(SC_setresgid, rgid, egid, sgid);