Bug#988119: micro-evtd: "/etc/init.d/micro-evtd stop" broken (world-writable pid file)

2021-05-05 Thread Ryan Tandy

The status file is also world writable.

$ ls -l /run/micro-evtd.*
-rw-rw-rw- 1 root root  4 May  5 22:32 /run/micro-evtd.pid
-rw-rw-rw- 1 root root 39 May  5 22:33 /run/micro-evtd.status



Bug#988119: micro-evtd: "/etc/init.d/micro-evtd stop" broken (world-writable pid file)

2021-05-05 Thread Ryan Tandy
Package: micro-evtd
Version: 3.4-5
Severity: normal

I just noticed while testing 3.4-6, that stopping the daemon doesn't work:

May 05 19:32:22 LS-GL2B6 systemd[1]: Stopping LSB: Daemon for Linkstation/Kuro 
micro controller...
May 05 19:32:23 LS-GL2B6 micro-evtd[578]: Stopping Daemon for Linkstation/Kuro 
micro controller: micro-evtd
May 05 19:32:23 LS-GL2B6 micro-evtd[587]: start-stop-daemon: matching on 
world-writable pidfile /var/run/micro-evtd.pid is insecure
May 05 19:32:23 LS-GL2B6 systemd[1]: micro-evtd.service: Control process 
exited, code=exited, status=2/INVALIDARGUMENT
May 05 19:32:23 LS-GL2B6 systemd[1]: micro-evtd.service: Failed with result 
'exit-code'.
May 05 19:32:23 LS-GL2B6 systemd[1]: micro-evtd.service: Unit process 563 
(micro-evtd) remains running after unit stopped.
May 05 19:32:23 LS-GL2B6 systemd[1]: Stopped LSB: Daemon for Linkstation/Kuro 
micro controller.

According to the man page of start-stop-daemon, this would affect the version 
in buster as well.