/etc/init.d/charybdis reload does nothing due to insecure PID file

Bug #1882928 reported by Malcolm Scott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charybdis (Ubuntu)
New
Undecided
Unassigned

Bug Description

On focal, I cannot reload charybdis from the init script (or from 'service' or 'systemctl'):

$ sudo SYSTEMCTL_SKIP_REDIRECT=1 bash -x /etc/init.d/charybdis reload
(...)
+ start-stop-daemon --stop --signal 1 --quiet --pidfile /var/run/charybdis/ircd.pid
start-stop-daemon: matching only on non-root pidfile /var/run/charybdis/ircd.pid is insecure

According to start-stop-daemon(8):

   -p, -pidfile pid-file
        (...)
        Warning: using this match option with a world-writable pidfile or using it alone with a daemon that writes the pidfile as an unprivileged (non-root) user will be refused with an error (since version 1.19.3)

This can be worked around by adding an --exec match to the invocation of start-stop-daemon in do_reload() in /etc/init.d/charybdis:

        start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --exec $DAEMON

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.