diff options
author | June McEnroe <june@causal.agency> | 2020-08-16 16:13:43 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-08-16 16:13:43 -0400 |
commit | e381f7bbe31a7e0d7fc6155341ce0ce9828c54d3 (patch) | |
tree | ec67f84a352fc67782d83eff444bb8cc2a2f776b | |
parent | Use process groups for services (diff) | |
download | catsit-e381f7bbe31a7e0d7fc6155341ce0ce9828c54d3.tar.gz catsit-e381f7bbe31a7e0d7fc6155341ce0ce9828c54d3.zip |
Clear groups list for services
Diffstat (limited to '')
-rw-r--r-- | service.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/service.c b/service.c index ec7ac68..e27437f 100644 --- a/service.c +++ b/service.c @@ -184,6 +184,9 @@ void serviceStart(struct Service *service) { error = setgid(serviceGID); if (error) err(ExitNoExec, "setgid"); + error = setgroups(1, &serviceGID); + if (error) err(ExitNoExec, "setgroups"); + error = setuid(serviceUID); if (error) err(ExitNoExec, "setuid"); |