1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:27:35 +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

@ -23,7 +23,7 @@ describing how to launch and manage this service.
* `KeepAlive` - whether the service should be restarted if it exits or crashes. For lazy services, this means the service will get respawned once a new connection is attempted on their socket after they exit or crash.
* `Lazy` - whether the service should only get spawned once a client attempts to connect to their socket.
* `Socket` - a path to a socket to create on behalf of the service. For lazy services, SystemServer will actually watch the socket for new connection attempts. An open file descriptor to this socket will be passed as fd 3 to the service.
* `User` - a name of the user to run the service as. This impacts what UID and GID the service processes have. By default, services are run as root.
* `User` - a name of the user to run the service as. This impacts what UID, GID (and extra GIDs) the service processes have. By default, services are run as root.
## Environment