use start-stop-daemon directly #921205

In init script use start-stop-daemon directly instead of lsb-base's
killproc which currently fails to pass on the executable name to s-s-d
(921558). This broke with s-s-d 1.19.2 which (for security reasons)
requires further filtering arguments in addition to --pidfile when the pid
file is not owned by root. Closes: #921205
parent 13afa98e
exim4 (4.92~RC5-2) unstable; urgency=high
* In init script use start-stop-daemon directly instead of lsb-base's
killproc which currently fails to pass on the executable name to s-s-d
(921558). This broke with s-s-d 1.19.2 which (for security reasons)
requires further filtering arguments in addition to --pidfile when the pid
file is not owned by root. Closes: #921205
-- Andreas Metzler <ametzler@debian.org> Thu, 07 Feb 2019 18:42:41 +0100
exim4 (4.92~RC5-1) unstable; urgency=medium
* New upstream snapshot rc5.
......
......@@ -130,15 +130,19 @@ stop_exim()
# we try to kill eximqr and exim SMTP listener, no matter what
# ${QUEUERUNNER} is set to, we could have switched since starting.
if [ -f "$QRPIDFILE" ]; then
killproc -p "$QRPIDFILE" "$DAEMON"
start-stop-daemon --stop --retry 5 --quiet --oknodo --remove-pidfile \
--pidfile "$QRPIDFILE" \
--exec "$DAEMON"
# exim does not remove the pidfile
if [ $? -eq 0 ] ; then rm -f "$QRPIDFILE" ; fi
if [ $? -eq 2 ] ; then rm -f "$QRPIDFILE" ; fi
log_progress_msg "exim4_queuerunner"
fi
if [ -f "$PIDFILE" ]; then
killproc -p "$PIDFILE" "$DAEMON"
start-stop-daemon --stop --retry 5 --quiet --oknodo --remove-pidfile \
--pidfile "$PIDFILE" \
--exec "$DAEMON"
# exim does not remove the pidfile
if [ $? -eq 0 ] ; then rm -f "$PIDFILE" ; fi
if [ $? -eq 2 ] ; then rm -f "$PIDFILE" ; fi
log_progress_msg "exim4_listener"
fi
}
......@@ -147,13 +151,19 @@ reload_exim()
{
case ${QUEUERUNNER} in
combined|no|ppp|queueonly)
killproc -p "$PIDFILE" "$DAEMON" -HUP
start-stop-daemon --stop --signal HUP --quiet --oknodo \
--pidfile "$PIDFILE" \
--exec "$DAEMON"
log_progress_msg "exim4"
;;
separate)
killproc -p "$PIDFILE" "$DAEMON" -HUP
start-stop-daemon --stop --signal HUP --quiet --oknodo \
--pidfile "$PIDFILE" \
--exec "$DAEMON"
log_progress_msg "exim4_listener"
killproc -p "$QRPIDFILE" "$DAEMON" -HUP
start-stop-daemon --stop --signal HUP --quiet --oknodo \
--pidfile "$QRPIDFILE" \
--exec "$DAEMON"
log_progress_msg "exim4_queuerunner"
;;
esac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment