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

SystemServer: Fetch any extra GIDs and call setgroups() before spawn

We now pick up all the user's extra GIDs from /etc/group and make
sure those are set before exec'ing a service.

This means we finally get to enjoy being in more than one group. :^)
This commit is contained in:
Andreas Kling 2020-01-04 13:04:46 +01:00
parent b4b8b8850a
commit c2b7c43f3c
3 changed files with 20 additions and 7 deletions

View file

@ -44,6 +44,7 @@ private:
String m_user;
uid_t m_uid { 0 };
gid_t m_gid { 0 };
Vector<gid_t> m_extra_gids;
// PID of the running instance of this service.
pid_t m_pid { -1 };