mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
Kernel: Move process extra_gids into protected data :^)
This commit is contained in:
parent
cbcf891040
commit
d677a73b0e
5 changed files with 11 additions and 11 deletions
|
@ -74,11 +74,11 @@ KResultOr<int> Process::sys$getgroups(ssize_t count, Userspace<gid_t*> user_gids
|
|||
if (count < 0)
|
||||
return EINVAL;
|
||||
if (!count)
|
||||
return m_extra_gids.size();
|
||||
if (count != (int)m_extra_gids.size())
|
||||
return extra_gids().size();
|
||||
if (count != (int)extra_gids().size())
|
||||
return EINVAL;
|
||||
|
||||
if (!copy_to_user(user_gids, m_extra_gids.data(), sizeof(gid_t) * count))
|
||||
if (!copy_to_user(user_gids, extra_gids().data(), sizeof(gid_t) * count))
|
||||
return EFAULT;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue