From 8dc2ee5e9b682145319cc81dfd12c14d5fab3215 Mon Sep 17 00:00:00 2001 From: Mikhail Gusarov Date: Thu, 6 Mar 2014 21:56:44 +0100 Subject: [PATCH] Do not allow to override user/group for rspamd in /etc/default/rspamd --- debian/rspamd.default | 2 -- debian/rspamd.init | 9 ++------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 debian/rspamd.default diff --git a/debian/rspamd.default b/debian/rspamd.default deleted file mode 100644 index 2676fcae9..000000000 --- a/debian/rspamd.default +++ /dev/null @@ -1,2 +0,0 @@ -RSPAMD_USERNAME=_rspamd -RSPAMD_GROUPNAME=_rspamd diff --git a/debian/rspamd.init b/debian/rspamd.init index 053dca89e..f50f2455a 100755 --- a/debian/rspamd.init +++ b/debian/rspamd.init @@ -20,15 +20,10 @@ DAEMON_ARGS="-c /etc/rspamd/rspamd.conf" DESC="rapid spam filtering system" PIDFILE=/run/rspamd/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME -RSPAMD_USERNAME=_rspamd -RSPAMD_GROUPNAME=_rspamd # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh @@ -55,11 +50,11 @@ do_start() # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started - mkdir -m 755 $RSPAMD_USERNAME:$RSPAMD_GROUPNAME -p /run/rspamd + mkdir -m 755 _rspamd:_rspamd -p /run/rspamd start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $DAEMON_ARGS -u $RSPAMD_USERNAME -g $RSPAMD_GROUPNAME \ + $DAEMON_ARGS -u _rspamd -g _rspamd \ || return 2 } -- 2.39.5