[PATCH] Fix session helper "crashing too rapidly"

From: Andrew Beverley <andy_at_andybev.com>
Date: Sun, 18 Sep 2011 21:05:35 +0100

Hi,

I have run into a problem using the session helper (ext_session_acl). In
its current format, the session helper expects 2 parameters as a
minimum. However, using the example at
http://wiki.squid-cache.org/ConfigExamples/Portal/Splash only one is
passed (the IP address).

The second parameter expected is referred to as the user_key in the
source code, which is then returned as a prefix in the reply. When
user_key is missing, ext_session_acl segfaults. When it *is* there, its
presence in the reply message breaks the protocol (according to
http://www.squid-cache.org/Doc/config/external_acl_type/ the reply
should begin with "OK" or "ERR").

The attached patch completely removes the user_key variable. It Works
For Me (TM), but I do not know the original intention for user_key. Is
it needed?

I would also like to see any STDERR messages from the helper logged to
cache.log (for example, if the database cannot be created). What is the
best way to achieve this? I couldn't work out a way to do it - they
appear to be "lost" at the moment.

Thanks,

Andy

Received on Sun Sep 18 2011 - 20:05:51 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 19 2011 - 12:00:03 MDT