Bug#921558: lsb-base: killproc does not pass name parameter to start-stop-daemon
Axel Beckert
abe at debian.org
Mon Mar 11 20:51:18 GMT 2019
Control: tag -1 + patch
Hi Dmitry,
Dmitry Bogatov wrote:
> > base=${1##*/}
> > if [ ! $pidfile ]; then
> > name_param="--name $base --pidfile /var/run/$base.pid"
> > else
> > name_param="--pidfile $pidfile"
> > fi
> >
> > The if clause checks for nonempty $pidfile instead of nonempty $base to
> > decide whether --name is used.
> >
> > Also --pidfile $pidfile is always used, even when $pidfile is empty.
> >
> > I am reportig this as serious since sid's start-stop-daemon requires a
> > name parameter in addition to --pidfile when the pidfile is not owned by
> > root, therefore this bug causes init script failures. (#921205)
#924312 was another one I filed earlier today. Just forcemerged it
into this.
> I believe it would be reasonable to add '--name $base' into `else'
> clause. Opinions?
Sounds sane, I just checked that with #924311 (miredo, uses
start-stop-daemon directly, edited the init script) as well as #924312
(stunnel4, by editing /lib/lsb/init-functions) and it worked in both
cases.
Here's the change I made to /lib/lsb/init-functions (as Dmitry already
suggested):
--- /lib/lsb/init-functions~ 2018-11-28 20:21:37.000000000 +0100
+++ /lib/lsb/init-functions 2019-03-11 21:46:41.673767215 +0100
@@ -141,7 +141,7 @@
if [ ! $pidfile ]; then
name_param="--name $base --pidfile /var/run/$base.pid"
else
- name_param="--pidfile $pidfile"
+ name_param="--name $base --pidfile $pidfile"
fi
sig=$(echo ${2:-} | sed -e 's/^-\(.*\)/\1/')
It though wouldn't hurt if e.g. Andreas could check if this change
would have fixed the issue in exim as well.
Regards, Axel
--
,''`. | Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
`- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://www.chiark.greenend.org.uk/pipermail/debian-init-diversity/attachments/20190311/25bc3cb4/attachment.sig>
More information about the Debian-init-diversity
mailing list