Re: [squid-users] Authentication Hack

From: Dave Coventry <dgcoventry@dont-contact.us>
Date: Wed, 5 Mar 2008 13:42:39 +0200

Thanks Adrian,

On Wed, Mar 5, 2008 at 1:31 PM, Adrian Chadd wrote:
> Uhm, try:
>
> #!/usr/bin/perl -w
>
> use strict; # (because you should!)
Point taken.

>
> $| = 1;
>
> while (<>) {
> chomp;
> my ($ip) = $_;
> # XXX should verify IP is an IP and not something nasty!
> ...
> }

I'll try it!

> The question then is how to query a cgi from a helper. I'd try the LWP stuff
> in Perl to talk to a cgi-bin ; what you've doen there is try to read a file,
> not call a cgi-bin. :)

My understanding is that Squid checks the helper to carry out a check
against the IP, User, etc according to the FORMAT parameter to test
that they belong to an acl, based on OK or ERR. My script was just a
simple test against the existence of a file generated by a cgi script
called by the ACCESS_DENIED error page replacement.

If you can see a way to short-cut this, please tell me more!

As far as I can see, though, Squid is looking for either OK or ERR and
ignores anything else....
Received on Wed Mar 05 2008 - 04:42:45 MST

This archive was generated by hypermail pre-2.1.9 : Tue Apr 01 2008 - 13:00:04 MDT