strerror (errno));
exit (-errno);
}
+
if (rspamd_main->cfg->rspamd_user &&
- initgroups (rspamd_main->cfg->rspamd_user, rspamd_main->workers_gid) ==
- -1) {
+ initgroups (rspamd_main->cfg->rspamd_user,
+ rspamd_main->workers_gid) == -1) {
msg_err_main ("initgroups failed (%s), aborting", strerror (errno));
exit (-errno);
}
+
if (setuid (rspamd_main->workers_uid) == -1) {
msg_err_main ("cannot setuid to %d (%s), aborting",
(gint) rspamd_main->workers_uid,
else {
cfg->cfg_name = cfg_names[0];
}
+
for (i = 1; i < cfg_num; i++) {
r = fork ();
if (r == 0) {
REF_RELEASE (old_cfg);
msg_info_main ("config has been reread successfully");
rspamd_map_preload (rspamd_main->cfg);
+
+ rspamd_main->cfg->rspamd_user = rspamd_user;
+ rspamd_main->cfg->rspamd_group = rspamd_group;
}
}