aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamd.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-05-13 13:31:23 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-05-13 13:31:23 +0100
commitce61fee9d25cc3ff647860fe646dc3af1ba17f0d (patch)
treee74a475c2f18f37a4694dc252b88e154d21a2d5c /src/rspamd.c
parenta6c019c98aeab124721984be79bc6ac994f38fb1 (diff)
downloadrspamd-ce61fee9d25cc3ff647860fe646dc3af1ba17f0d.tar.gz
rspamd-ce61fee9d25cc3ff647860fe646dc3af1ba17f0d.zip
[Minor] Allow to run without an explicit group name when `-u` is set
Diffstat (limited to 'src/rspamd.c')
-rw-r--r--src/rspamd.c3
1 files changed, 2 insertions, 1 deletions
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;
}