]> source.dussan.org Git - rspamd.git/commitdiff
Do not allow to override user/group for rspamd in /etc/default/rspamd
authorMikhail Gusarov <dottedmag@dottedmag.net>
Thu, 6 Mar 2014 20:56:44 +0000 (21:56 +0100)
committerMikhail Gusarov <dottedmag@dottedmag.net>
Thu, 6 Mar 2014 20:56:44 +0000 (21:56 +0100)
debian/rspamd.default [deleted file]
debian/rspamd.init

diff --git a/debian/rspamd.default b/debian/rspamd.default
deleted file mode 100644 (file)
index 2676fca..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-RSPAMD_USERNAME=_rspamd
-RSPAMD_GROUPNAME=_rspamd
index 053dca89e145ee8a0515c1dbcd11b5fed03555d2..f50f2455a7910276ce18fd26d1e80b768d0283a1 100755 (executable)
@@ -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
 }