Re: squidGuard test error
Olaf Westrik <weizen_42-Yz37vSk3/[email protected]>
| Newsgroups | gmane.comp.security.ipcop.devel |
|---|---|
| Message-ID | <[email protected]> |
>>> Since a some days, squidGuard test fail with
>>> -------------------------
>>> Running test1 with 1005 requests..2012-02-10 18:45:26 [31694]
>>> ../src/squidGuard: can't write to logfile
>> /var/log/squidGuard/squidGuard.log
>>>
>>> Last good test was for me 20120119. First test failure was 20120204
>>> I didn't test every day and didn't always svn up my tree.
>>> I suspect it may be related to the squidguard patch commited the 1st
>>> februar.
>>>
>> I was wrong. I had the "can't write to logfile
>> /var/log/squidGuard/squidGuard.log" message before the squidGuard patch
> was
>> commited. As I am testing with a different db ./configure, that may be the
>> cause of the error.
>>
>> Gilles
>>
> I tested with standard db configure.
> Without squidguard patch, tests run normally, with patch, tests fail.
> I haven't yet tested the change on installed machine.
I have not looked at the test in detail, but our patch is the cause.
The patch changes the stdout behaviour of squidGuard, without the patch
'chaining' multiple squid redirectors (URL filter, others) is much more
difficult.
Squid redirectors work by grabbing stdin and writing to stdout in case
of URL 'change'. Something like:
echo "ipcop.org" | squidGuard
and then looking at stdout.
The easiest way to do multiple redirectors would be:
echo "ipcop.org" | squidGuard | redirector2
That does not work with standard mechanism, because there is only
puts("") output from squidGuard if the URL is 'OK'. That will cause the
2nd redirector to fail (invalid URL).
I will check if it is possible to only do the modified stdout writing by
a commandline option. In that case the tests will work OK, and squid can
use squidGuard with something like: squidGuard --full-stdout | redirector2
Olaf
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/