From: Vsevolod Stakhov Date: Sat, 13 May 2023 12:31:23 +0000 (+0100) Subject: [Minor] Allow to run without an explicit group name when `-u` is set X-Git-Tag: 3.6~121 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ce61fee9d25cc3ff647860fe646dc3af1ba17f0d;p=rspamd.git [Minor] Allow to run without an explicit group name when `-u` is set --- diff --git a/src/rspamd.c b/src/rspamd.c index 17c6a8286..57daf2319 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -272,7 +272,8 @@ detect_priv (struct rspamd_main *rspamd_main) rspamd_main->workers_gid = grp->gr_gid; } else { - rspamd_main->workers_gid = (gid_t)-1; + /* Use the main group of user */ + rspamd_main->workers_gid = pwd->pw_gid; } rspamd_main->workers_uid = pwd->pw_uid; }