From cffb3056b959a23444632c9473f75ba9980052d8 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Jun 14 2012 15:48:15 +0000 Subject: daemon: skip setup_groups when no -U or -G setting up groups uses user name and gid. Signed-off-by: David Teigland --- diff --git a/src/main.c b/src/main.c index abc35fd..e9d8f40 100644 --- a/src/main.c +++ b/src/main.c @@ -1188,6 +1188,9 @@ static void setup_groups(void) int pngroups, sngroups, ngroups_max; gid_t *pgroup, *sgroup; + if (!com.uname || !com.gname) + return; + ngroups_max = sysconf(_SC_NGROUPS_MAX); if (ngroups_max < 0) { log_error("cannot get the max number of groups %i", errno);