Go to file
Jacek Ablewicz 38663a4af3 Bug 13431 - Shared FastMmap file causes issues
Koha::Cache package does not take into account that, when using
fastmmap caching variant, mmaped cache file created in /tmp
(typically: /tmp/sharefile-koha-koha), would only be further
accessible to the one given OS user - the one which created it.
In many Koha setups, in the circumstances when various system scripts
are executed by 2+ users with diffrent UIDs (like multi-tenant servers,
for example) this may cause many kinds of issues. Observable symptom
is usually the appearance of the below error when searching, or looking
at MARC Framework pages and a few other places:

Open of share file /tmp/sharefile-koha-koha failed: Permission denied
at /usr/lib/perl5/Cache/FastMmap.pm line 640.

This patch:
- disables initialisation of fastmmap caching subsystem unless it is
explicitly requested by the user (CACHING_SYSTEM=fastmmap)
- disables fastmmap cache usage for command line scripts
(i.e. when GATEWAY_INTERFACE environment variable is not defined)
- adds the database name, host name and an ID of the OS user to the
mmaped file name created in /tmp, to prevent various kinds of
unintentional conflicts and/or permission problems from happening

To test:

1) remove the /tmp/sharefile-koha-* file[s] (if any)
2) do something which would lead to its re-creation (e.g., performing
any search in OPAC should be sufficient to cause that)
3) observe that /tmp/sharefile-koha-koha got created
4) remove it
5) apply patch
6) redo step 2)
7) observe that aforementioned file is no longer created in /tmp
8) set CACHING_SYSTEM environment variable to 'fastmmap'
9) redo step 2), observe that /tmp/sharefile-koha-* file got created
and that it's name now contains hostname, database name and UID
10) ensure that everything still works like it should and that there
are no regressions of any kinds anywhere in the system ;)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9e701294dd)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2015-02-14 20:36:52 +13:00
C4 Bug - 5511 [Followup]: Missed Instance 2015-02-14 20:08:24 +13:00
Koha Bug 13431 - Shared FastMmap file causes issues 2015-02-14 20:36:52 +13:00
OpenILS Bug 9239 QA follow-up: remove stray debug code 2013-03-16 21:32:34 -04:00
acqui Bug 12323 [SIGNED OFF] - Acquisitions search results fixed in order of biblionumber 2015-02-14 20:22:47 +13:00
admin Revert "Bug 13352: On editing, prices should not be formatted" 2015-02-13 14:19:54 +13:00
authorities Bug 12573: Use correct comparison for comparing strings 2014-10-28 10:44:21 -03:00
basket Bug 9530 making changes to basket/sendbasket.pl 2014-10-27 10:38:20 -03:00
catalogue Bug 12980: GetHistory does useless processing 2014-12-04 09:02:49 +13:00
cataloguing Bug 13268: the size should not be emptied in pl script 2015-02-10 09:52:01 +13:00
circ Bug 13298 - Holds ratios report ignores ordered items 2015-02-13 14:21:34 +13:00
course_reserves Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
debian Bug 13571: followup to remove some now-unused options 2015-01-18 15:37:21 +13:00
docs Bug 7143 : Updating history and about page 2014-11-19 13:30:12 -03:00
errors Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
etc Bug 13570 - koha-conf.xml mentions win32 2015-01-18 15:34:58 +13:00
install_misc GRS-1 deprecation leftover used by jenkins 2015-01-18 14:50:55 +13:00
installer Bumping db version to 3.18.03.002 2015-02-14 20:11:00 +13:00
koha-tmpl Bug 13670 - Patron holds table not loading when holds tab anchor is used 2015-02-14 20:30:50 +13:00
labels Bug 11614: Untranslatable label_element_title in label management 2014-08-19 09:42:42 -03:00
members Bug 13602: (QA followup) take advantage of the defined-or operator 2015-02-13 10:43:14 +13:00
misc Updating release notes 2015-01-23 09:36:50 +13:00
offline_circ Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
opac Bug 13526 - Mandatory fields should not be able to be hidden in borrower self-registration 2015-01-20 08:07:44 +13:00
patron_lists Bug 10565: (follow-up) add new user permission for patron list management 2013-10-14 22:43:03 +00:00
patroncards Bug 5502 - Patron card category search field should be menu 2014-08-10 09:30:47 -03:00
plugins Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
reports Bug 12567: Make catalog statistics wizard publication year work for MARC21 2014-12-02 08:23:03 +13:00
reserve Bug 13116 [QA Followup] - Remove tabs, use unless instead of if 2014-11-12 11:23:45 -03:00
reviews Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
rotating_collections Bug 8836 [QA Followup] - Sort transfer branches alphabetically 2014-11-06 15:12:20 -03:00
selenium
…
serials Bug 12852: C4::Bookseller should not be imported anymore 2014-12-04 09:12:55 +13:00
services Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
skel Bug 11078: Add locking to rebuild_zebra 2014-02-28 22:21:41 +00:00
sms Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
suggestion Bug 12627: Fix default values 2014-11-07 15:17:10 -03:00
svc Bug 13215: The same letter code can be used for several libraries 2014-11-27 11:42:14 -03:00
t Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber 2015-02-14 20:26:53 +13:00
tags Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
test Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
tmp/modified_authorities
…
tools Bug 12860: the export tools explodes if a field is not exported 2015-02-11 11:02:55 +13:00
virtualshelves Bug 9530 making changes to virtualshelves/sendshelf.pl 2014-10-27 10:38:25 -03:00
xt Bug 13199: follow up to fix Licence and some koha-qa errors 2014-11-20 09:47:54 -03:00
.editorconfig Bug 12545: Add EditorConfig.org file to the source tree 2014-08-22 11:07:45 -03:00
.htaccess
…
.mailmap Bug 13314: Follow-up for m.de.rooy in .mailmap 2014-11-26 11:16:18 -03:00
INSTALL
…
INSTALL.debian Bug 8092 follow-up: Add optional dependency on CHI 2012-06-09 13:08:18 +02:00
INSTALL.fedora7 Bug 11757: remove dependency on POE 2014-02-15 01:38:15 +00:00
INSTALL.opensuse Bug 11757: remove dependency on POE 2014-02-15 01:38:15 +00:00
INSTALL.ubuntu Bug 7764: (follow-up) editorial tweaks 2013-10-04 16:27:55 +00:00
LICENSE Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-06 23:54:46 -05:00
Makefile.PL Bug 13398: rotating collections scripts are skipped on install 2014-12-18 13:05:09 +13:00
README Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
README.robots
…
about.pl Bug 13404 [QA Followup] 2015-02-13 11:32:03 +13:00
changelanguage.pl
…
edithelp.pl Bug 11661: sanitize file names supplied to edithelp.pl 2014-02-05 01:36:10 +00:00
fix-perl-path.PL
…
help.pl Bug 11238: contruct links to the appropriate manual version dynamically 2013-11-23 19:30:16 +00:00
install-CPAN.pl
…
koha_perl_deps.pl bug 10548: fix count of missing required dependencies by koha_perl_deps.pl 2013-07-11 14:03:32 +00:00
kohaversion.pl Bumping db version to 3.18.03.002 2015-02-14 20:11:00 +13:00
mainpage.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
rewrite-config.PL Bug 12031: [QA Follow-up] Undefined routine and change to koha-conf.xml 2014-10-27 10:38:11 -03:00

README

Koha is a free software integrated library system.

Koha is distributed under the GNU GPL version 3 or later.
Please read the file LICENSE for more details.

To install or upgrade Koha, please see the INSTALL file appropriate
to your platform.

Report bugs at http://bugs.koha-community.org/

Visit the Koha Project website at http://www.koha-community.org/