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:
parent
2a502fe232
commit
70337f3a4b
5 changed files with 43 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue