Bugzilla – Attachment 109826 Details for
Bug 24749
Plack restart should clear orphaned cgi_compile directories on restart
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24749: Attempt to use tmp_path from koha-conf for TMPDIR for starman
Bug-24749-Attempt-to-use-tmppath-from-koha-conf-fo.patch (text/plain), 1.77 KB, created by
Nick Clemens (kidclamp)
on 2020-09-09 14:44:18 UTC
(
hide
)
Description:
Bug 24749: Attempt to use tmp_path from koha-conf for TMPDIR for starman
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-09-09 14:44:18 UTC
Size:
1.77 KB
patch
obsolete
>From 94af1c6b538194f1a576d3c38615a713f8121d49 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 9 Sep 2020 14:40:53 +0000 >Subject: [PATCH] Bug 24749: Attempt to use tmp_path from koha-conf for TMPDIR > for starman > >The issue described on this bug is triggered when a process ID is reused, but the directory >belongs to another koha instance on the same server > >To mitigate this issue we attemtped to force plack to use an instance specific >TMPDIR as CGI::Compile simply uses File::Spec::tmpdir to decide where to compile >files > >If the folder belongs to the instance then we shouldn't have permissions issues > >Sadly these patches, while brilliant, do not work > >Attaching in the hopes someone even more brilliant can complete the work >--- > Koha/Middleware/SetEnv.pm | 3 +++ > debian/scripts/koha-plack | 2 ++ > 2 files changed, 5 insertions(+) > >diff --git a/Koha/Middleware/SetEnv.pm b/Koha/Middleware/SetEnv.pm >index 6807392c1a..3abe1d779a 100644 >--- a/Koha/Middleware/SetEnv.pm >+++ b/Koha/Middleware/SetEnv.pm >@@ -95,6 +95,9 @@ sub call { > } > } @setenv_headers; > >+ $setenvs{TMPDIR} = C4::Context->temporary_directory; >+ # See bug 24749 >+ > # Finally, everything is shoved into the $env. > $env = { > %$env, >diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack >index 3dcce331a9..72cd21a928 100755 >--- a/debian/scripts/koha-plack >+++ b/debian/scripts/koha-plack >@@ -84,6 +84,8 @@ start_plack() > [ -z $PLACK_MAX_REQUESTS ] && PLACK_MAX_REQUESTS="50" > PLACK_WORKERS=$(run_safe_xmlstarlet $instancename plack_workers) > [ -z $PLACK_WORKERS ] && PLACK_WORKERS="2" >+ KOHATMPDIR=$(run_safe_xmlstarlet $instancename tmp_path) >+ [ -z $KOHATMPDIR ] || TMPDIR=$KOHATMPDIR > > instance_user="${instancename}-koha" > >-- >2.11.0
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 24749
: 109826