- Run main process as root and drop worker privileges

PR:		250904
Submitted by:	Alexander Moisseev <moiseev at mezonplus.ru>
This commit is contained in:
Vsevolod Stakhov 2020-11-06 18:53:51 +00:00
parent 54c8cf842d
commit ec48df1166
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=554311
6 changed files with 18 additions and 12 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= rspamd
PORTVERSION= 2.6.a1.20200929
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= mail
PKGNAMESUFFIX= -devel

View File

@ -5,6 +5,9 @@
rspamd_enable="YES"
- Optionally you can adjust the user which runs Rspamd workers with the
variables rspamd_worker_user and rspamd_worker_group (default rspamd:rspamd).
- A symbolic link to %%ETCDIR%%/rspamd.newsyslog.conf
has been created in the /usr/local/etc/newsyslog.conf.d directory.
You can edit %%ETCDIR%%/rspamd.newsyslog.conf

View File

@ -12,9 +12,9 @@
# rspamd_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable rspamd.
#
# rspamd_user (str): Default to "rspamd".
# rspamd_worker_user (str): Default to "rspamd".
#
# rspamd_group (str): Default to "rspamd".
# rspamd_worker_group (str): Default to "rspamd".
#
# rspamd_flags (str): Default to "-c %%PREFIX%%/etc/rspamd.conf".
@ -26,8 +26,8 @@ rcvar=rspamd_enable
load_rc_config $name
: ${rspamd_enable:="NO"}
: ${rspamd_user="rspamd"}
: ${rspamd_group="rspamd"}
: ${rspamd_worker_user="rspamd"}
: ${rspamd_worker_group="rspamd"}
: ${rspamd_flags="-c %%PREFIX%%/etc/rspamd/rspamd.conf"}
pidfile=${rspamd_pidfile:-"/var/run/rspamd/rspamd.pid"}
@ -40,7 +40,7 @@ configtest_cmd="rspamd_checkconfig"
reopenlog_cmd="reopenlog_cmd"
required_files=%%PREFIX%%/etc/rspamd/rspamd.conf
command_args="-u ${rspamd_user} -g ${rspamd_group}"
command_args="-u ${rspamd_worker_user} -g ${rspamd_worker_group}"
extra_commands="reload configtest reopenlog"
stop_postcmd="rm -f $pidfile"
sig_reload="HUP"

View File

@ -2,7 +2,7 @@
PORTNAME= rspamd
PORTVERSION= 2.6
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= mail
MAINTAINER= vsevolod@FreeBSD.org

View File

@ -5,6 +5,9 @@
rspamd_enable="YES"
- Optionally you can adjust the user which runs Rspamd workers with the
variables rspamd_worker_user and rspamd_worker_group (default rspamd:rspamd).
- A symbolic link to %%ETCDIR%%/rspamd.newsyslog.conf
has been created in the /usr/local/etc/newsyslog.conf.d directory.
You can edit %%ETCDIR%%/rspamd.newsyslog.conf

View File

@ -12,9 +12,9 @@
# rspamd_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable rspamd.
#
# rspamd_user (str): Default to "rspamd".
# rspamd_worker_user (str): Default to "rspamd".
#
# rspamd_group (str): Default to "rspamd".
# rspamd_worker_group (str): Default to "rspamd".
#
# rspamd_flags (str): Default to "-c %%PREFIX%%/etc/rspamd.conf".
@ -26,8 +26,8 @@ rcvar=rspamd_enable
load_rc_config $name
: ${rspamd_enable:="NO"}
: ${rspamd_user="rspamd"}
: ${rspamd_group="rspamd"}
: ${rspamd_worker_user="rspamd"}
: ${rspamd_worker_group="rspamd"}
: ${rspamd_flags="-c %%PREFIX%%/etc/rspamd/rspamd.conf"}
pidfile=${rspamd_pidfile:-"/var/run/rspamd/rspamd.pid"}
@ -40,7 +40,7 @@ configtest_cmd="rspamd_checkconfig"
reopenlog_cmd="reopenlog_cmd"
required_files=%%PREFIX%%/etc/rspamd/rspamd.conf
command_args="-u ${rspamd_user} -g ${rspamd_group}"
command_args="-u ${rspamd_worker_user} -g ${rspamd_worker_group}"
extra_commands="reload configtest reopenlog"
stop_postcmd="rm -f $pidfile"
sig_reload="HUP"