]> git.koha-community.org Git - koha.git/commit
Bug 15553 - [SIGNED-OFF] cgisess_ files polluting the /tmp directory
authorBlou <philippe.blouin@inlibro.com>
Mon, 11 Jan 2016 21:41:11 +0000 (16:41 -0500)
committerFrédéric Demians <f.demians@tamil.fr>
Thu, 11 Feb 2016 19:04:30 +0000 (20:04 +0100)
commit5a0dc0c2a49fcb960548fe90f0e97b6a8c12a1ff
treeccad9ead4f71274e7431efa2981c23a503683617
parent66e9870a3e50cd937cab93fc23085e372e66cf3e
Bug 15553 - [SIGNED-OFF] cgisess_ files polluting the /tmp directory

When some users want to improve performance, one suggestion is to switch the syspref "sessionstorage" to 'tmp',
which store the session info in the /tmp directory instead of the database.

Depending on the frequency of the cleaning process (or lack thereof),
this can be heavy pollution into the /tmp directory, making it unusable.
"rm cgi*" would not even work since cgi* extends to over 8000 items...

A simple fix is to modify the target directory in C4/Auth.pm to /tmp/cgisess.

Testing scenario:
1) change the syspref SessionStorage to 'tmp'
2) Log into the OPAC, validate that a file named /tmp/cgisess_(something) got created
3) Apply the patch
4) Log into the OPAC, validate that a file /tmp/cgisess/cgisess_(something) got created

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Session files are created in /tmp/cgisess/ instead
of directly in /tmp. I usually store sessions in memcached, but a
couple of times memcached has died on me, and before I knew it, /tmp
was so full of sessions files, I could not easily delete them with
"rm /tmp/cgisess*". Being able to delete /tmp/cgisess/ should be a
bit easier.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 3815915a3338c4380da7773acc675b07ac82562d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 6efb2ebc0f81c5eaa7e42475495131f578487ffc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
C4/Auth.pm