Package: mumble-server
Version: 1.3.0~git20190125.440b173+dfsg-2
Severity: normal

Hi,

currently /etc/init.d/mumble-server stop doesn't does not stop the murmurd
and "restart" spawns an additional instance of mumble-server, leading to
various problems. I'd assume "force-reload" is similarly affected.

This is caused by two separate issues:

First the init script specifies "--user $USER", where $USER is "root"
by default. But murmur will (by default) drop itself to "mumble-server"
user; so this flag prevents start-stop-daemon from finding the process.
Removing the --user switches resolves this part. I've included the modified 
init-script below.

Second murmur does not write its own pidfile in the default setup.
I was able to fix this with
   chown root:mumble-server $PIDDIR && chmod g+w PIDDIR
This is a bit crude though and ideally murmurd would write its pidfile
_before_ dropping privileges instead if that's possible.
Apparently murmurd already does read ssl certificates before dropping
privileges.

There's also a related upstream issue, albeit apparently stale:
 https://github.com/mumble-voip/mumble/issues/2388

~~ Nils



-- System Information:
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
Architecture: armv7l

Kernel: Linux 5.4.83-v7+ (SMP w/4 CPU cores)
Kernel taint flags: TAINT_CRAP
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mumble-server depends on:
ii  adduser                    3.118
ii  debconf [debconf-2.0]      1.5.71
ii  libatomic1                 8.3.0-6+rpi1
ii  libavahi-client3           0.7-4+b1
ii  libavahi-common3           0.7-4+b1
ii  libavahi-compat-libdnssd1  0.7-4+b1
ii  libc6                      2.28-10+rpi1
ii  libcap2                    1:2.25-2
ii  libgcc1                    1:8.3.0-6+rpi1
ii  libprotobuf17              3.6.1.3-2+rpi1
ii  libqt5core5a               5.11.3+dfsg1-1+rpi1+deb10u4
ii  libqt5dbus5                5.11.3+dfsg1-1+rpi1+deb10u4
ii  libqt5network5             5.11.3+dfsg1-1+rpi1+deb10u4
ii  libqt5sql5                 5.11.3+dfsg1-1+rpi1+deb10u4
ii  libqt5sql5-sqlite          5.11.3+dfsg1-1+rpi1+deb10u4
ii  libqt5xml5                 5.11.3+dfsg1-1+rpi1+deb10u4
ii  libssl1.1                  1.1.1d-0+deb10u4+rpt1
ii  libstdc++6                 8.3.0-6+rpi1
ii  libzeroc-ice3.7            3.7.2-4
ii  lsb-base                   10.2019051400+rpi1

mumble-server recommends no packages.

mumble-server suggests no packages.

-- Configuration Files:
/etc/init.d/mumble-server changed:
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=mumble-server
DESC="Mumble VoIP Server"
PIDDIR=/run/$NAME
PIDFILE=$PIDDIR/$NAME.pid
DAEMON=/usr/sbin/murmurd
#USER=mumble-server
# mumble will drop to 'mumble-server' itself
USER=root
GROUP=mumble-server
test -x $DAEMON || exit 0
INIFILE=/etc/mumble-server.ini
DAEMON_OPTS="-ini $INIFILE"
MURMUR_USE_CAPABILITIES=0
MURMUR_LIMIT_NOFILE=0
if [ -f /etc/default/$NAME ] ; then
        . /etc/default/$NAME
fi
. /lib/init/vars.sh
. /lib/lsb/init-functions
if [ "$MURMUR_LIMIT_NOFILE" -gt 0 ] ; then
        ulimit -n $MURMUR_LIMIT_NOFILE
fi
case "$1" in
  start)
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
        [ -d $PIDDIR ] || install -o $USER -d $PIDDIR
        if [ "$MURMUR_USE_CAPABILITIES" != "1" ] ; then
          start-stop-daemon --start --quiet \
                --pidfile $PIDFILE \
                --chuid $USER:$GROUP \
                --exec $DAEMON \
                -- $DAEMON_OPTS
        else
          start-stop-daemon --start --quiet \
                --pidfile $PIDFILE \
                --exec $DAEMON \
                -- $DAEMON_OPTS
        fi
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
        start-stop-daemon --stop --quiet \
                --retry=TERM/30/KILL/5 \
                --pidfile $PIDFILE \
                --exec $DAEMON
                #--user $USER \
        case "$?" in
                0|1)    rm -f $PIDFILE
                        [ "$VERBOSE" != no ] && log_end_msg 0
                        ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  status)
        if start-stop-daemon --test --stop --quiet \
                --pidfile $PIDFILE \
                --exec $DAEMON
                #--user $USER \
        then
                [ "$VERBOSE" != no ] && echo "$DESC is running."
                exit 0
        else
                [ "$VERBOSE" != no ] && echo "$DESC is not running"
                exit 3
        fi
        ;;
  force-reload)
                #--user $USER \
        start-stop-daemon --stop --test --quiet \
                --pidfile $PIDFILE \
                --exec $DAEMON \
        && $0 restart || exit 0
        ;;
  restart)
        [ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME"
        start-stop-daemon --stop --quiet \
                --retry=TERM/30/KILL/5 \
                --pidfile $PIDFILE \
                --exec $DAEMON
                #--user $USER \
        case "$?" in
                0|1)
                        [ -d $PIDDIR ] || install -o $USER -d $PIDDIR
                        rm -f $PIDFILE
                        if [ "$MURMUR_USE_CAPABILITIES" != "1" ] ; then
                          start-stop-daemon --start --quiet \
                                --pidfile $PIDFILE \
                                --chuid $USER:$GROUP \
                                --exec $DAEMON \
                                -- $DAEMON_OPTS
                        else
                          start-stop-daemon --start --quiet \
                                --pidfile $PIDFILE \
                                --exec $DAEMON \
                                -- $DAEMON_OPTS
                        fi
                        case "$?" in
                                0) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                                *) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
                        esac
                        ;;
                *)
                        [ "$VERBOSE" != no ] && log_end_msg 0
                        ;;
        esac
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 3
        ;;
esac
exit 0


-- debconf information:
  mumble-server/start_daemon: true
  mumble-server/use_capabilities: false

Reply via email to