mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 17:15:26 +00:00
Kernel: Simplify sys$setgroups(0, ...)
If we're dropping all groups, just clear the extra_gids and return.
This commit is contained in:
@@ -2727,6 +2727,11 @@ int Process::sys$setgroups(ssize_t count, const gid_t* user_gids)
|
||||
if (count && !validate_read(user_gids, count))
|
||||
return -EFAULT;
|
||||
|
||||
if (!count) {
|
||||
m_extra_gids.clear();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Vector<gid_t> gids;
|
||||
gids.resize(count);
|
||||
copy_from_user(gids.data(), user_gids, sizeof(gid_t) * count);
|
||||
|
||||
Reference in New Issue
Block a user