]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Allow to run without an explicit group name when `-u` is set
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 13 May 2023 12:31:23 +0000 (13:31 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 13 May 2023 12:31:23 +0000 (13:31 +0100)
src/rspamd.c

index 17c6a828687d0ce91b7dff298582e5594901609e..57daf2319fa4472eefd13aea45f423c946a3eea9 100644 (file)
@@ -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;
                }