Bugzilla – Attachment 104977 Details for
Bug 25481
koha-plack not working under D10
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25481: Pass --user to start-stop-daemon when a pidfile is used
Bug-25481-Pass---user-to-start-stop-daemon-when-a-.patch (text/plain), 2.51 KB, created by
Victor Grousset/tuxayo
on 2020-05-15 23:03:15 UTC
(
hide
)
Description:
Bug 25481: Pass --user to start-stop-daemon when a pidfile is used
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2020-05-15 23:03:15 UTC
Size:
2.51 KB
patch
obsolete
>From 08dc51e36a4b9ef7bd53c3453360c44c02d3fd8b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 14 May 2020 16:04:20 +0200 >Subject: [PATCH] Bug 25481: Pass --user to start-stop-daemon when a pidfile is > used > >Since D10, the behaviour of start-stop-daemon changed, see from its >manual: >""" >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) as this is a security risk, because either any user can write to it, or if the daemon gets compromised, the contents of the pidfile cannot be trusted, and then a privileged >runner (such as an init script executed as root) would end up acting on any system process. Using /dev/null is exempt from these checks. >""" > >Test plan: >koha-plack --restart kohadev >should success with this patch. >Without this patch you get: >start-stop-daemon: matching only on non-root pidfile /var/run/koha/kohadev/plack.pid is insecure > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > debian/scripts/koha-functions.sh | 2 ++ > debian/scripts/koha-plack | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh >index 8687845aa5..082d3628fa 100755 >--- a/debian/scripts/koha-functions.sh >+++ b/debian/scripts/koha-functions.sh >@@ -269,6 +269,7 @@ is_plack_running() > local instancename=$1 > > if start-stop-daemon --pidfile "/var/run/koha/${instancename}/plack.pid" \ >+ --user="$instancename-koha" \ > --status ; then > return 0 > else >@@ -292,6 +293,7 @@ is_z3950_running() > local instancename=$1 > > if start-stop-daemon --pidfile "/var/run/koha/${instancename}/z3950-responder.pid" \ >+ --user="$instancename-koha" \ > --status ; then > return 0 > else >diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack >index e541d44178..90da6cbd36 100755 >--- a/debian/scripts/koha-plack >+++ b/debian/scripts/koha-plack >@@ -144,7 +144,7 @@ stop_plack() > > log_daemon_msg "Stopping Plack daemon for ${instancename}" > >- if start-stop-daemon --pidfile ${PIDFILE} --stop --retry=TERM/30/KILL/5; then >+ if start-stop-daemon --pidfile ${PIDFILE} --user="${instancename}-koha" --stop --retry=TERM/30/KILL/5; then > log_end_msg 0 > else > log_end_msg 1 >-- >2.26.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25481
:
104887
|
104922
|
104941
|
104977
|
105088