Hi Karl, thank you for your report (and really appreciate the patch). I will upload the updated version shortly.
Best, Antonin * Karl O. Pinc <k...@karlpinc.com> [2020-01-02 00:54] wrote: > Package: sqlgrey > Version: 1:1.8.0-1 > Severity: serious > Tags: patch > Justification: Policy 9.3.2 > > Hello, > > /etc/init.d/sqlgrey does not stop the sqlgrey daemon. (Policy > seems to say that being able to stop is required, so I've marked > the bug serious.) > > The problem is that start-stop-daemon --pidfile is no longer > sufficient to stop a daemon when the pidfile is written as > a non-priviliged user. So the daemon is not stopped. > (As of start-stop-daemon version 1.19.3.) > > The attached patch adds "--user sqlgrey" to the start-stop-daemon > command, which is enough that the command stops the daemon. > > Regards, > Karl > > -- System Information: > Debian Release: 10.2 > APT prefers stable > APT policy: (500, 'stable') > Architecture: amd64 (x86_64) > > Kernel: Linux 4.19.0-6-amd64 (SMP w/4 CPU cores) > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), > LANGUAGE=en_US.UTF-8 (charmap=UTF-8) > Shell: /bin/sh linked to /bin/dash > Init: systemd (via /run/systemd/system) > LSM: AppArmor: enabled > > Versions of packages sqlgrey depends on: > ii adduser 3.118 > pn libdate-calc-perl <none> > pn libdbd-pg-perl | libdbd-mysql-perl | libdbd-sqlite3-perl <none> > pn libnet-server-perl <none> > ii perl 5.28.1-6 > > Versions of packages sqlgrey recommends: > pn libdbd-pg-perl <none> > ii postfix 3.4.7-0+deb10u1 > > sqlgrey suggests no packages. > --- sqlgrey 2020-01-01 17:23:16.952002224 -0600 > +++ sqlgrey.new 2020-01-01 17:35:18.719746141 -0600 > @@ -48,7 +48,8 @@ > ;; > stop) > echo -n "Stopping $DESC: $NAME" > - start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo > + start-stop-daemon --stop --quiet \ > + --user sqlgrey --pidfile $PIDFILE --oknodo > rm -f $PIDFILE > echo "." > ;;