summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--service.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/service.c b/service.c
index 3178f79..78890b8 100644
--- a/service.c
+++ b/service.c
@@ -187,8 +187,10 @@ void serviceStart(struct Service *service) {
 		error = setgid(serviceGID);
 		if (error) err(ExitNoExec, "setgid");
 
-		error = setgroups(1, &serviceGID);
-		if (error) err(ExitNoExec, "setgroups");
+		if (!getuid()) {
+			error = setgroups(1, &serviceGID);
+			if (error) err(ExitNoExec, "setgroups");
+		}
 
 		error = setuid(serviceUID);
 		if (error) err(ExitNoExec, "setuid");
colspan='3' class='logmsg'> 2020-05-04Add hack for macOS to search extra man sectionsJune McEnroe 2020-05-04Don't clear MANSECTJune McEnroe