Re: [squid-users] How to debug external_acl_type

From: Maik Kündig <Maik.Kuendig_at_reist-tele.com>
Date: Wed, 26 Aug 2009 17:13:10 +0200

Hallo,

Am 26.08.09 11:37, "Maik Kündig" <Maik.Kuendig_at_reist-tele.com> schrieb:

> Am 26.08.09 11:21, "John Doe" <jdmls_at_yahoo.com> schrieb:
>
>> From: Maik Kündig <Maik.Kuendig_at_reist-tele.com>
>>> I need some help to debug a external_acly_type problem.
>>> print "OK";
>> Maybe try with:
>> print "OK\n";
> Have tried both versions with "\n" and without ...

It looks like "external_acl_type" is startet, but never enters to loop.

Squid.conf
-----8<-----
acl all src all

auth_param basic program /usr/local/bin/my-auth.pl
external_acl_type myAclType children=1 ttl=1 %SRC %LOGIN
/usr/local/bin/foobar
acl MyAcl external myAclType

http_access allow MyAcl

http_port 3128
debug_options ALL,1 82,9 4,9 28,9

hosts_file /etc/hosts
access_log /var/log/squid/access.log squid
coredump_dir /var/spool/squid
----->8-----

foobar:
-----8<-----
#!/usr/bin/perl

$|=1;

#my $processid = $$;
#my $FILENAME = "/tmp/acl_log_${processid}";
my $FILENAME = "/tmp/acl.log";

open (MYFILE, ">>$FILENAME");
print MYFILE "Start\n";
close (MYFILE);

while (<>) {
  open (MYFILE, ">>$FILENAME");
  print MYFILE "Loop\n";
  print "OK";
  close (MYFILE);
}
----->8-----

ps aux | grep foobar:
-----8<-----
proxy 10056 0.0 0.5 4820 1384 ? Ss 01:41 0:00
/usr/bin/perl /usr/local/bin/foobar.pl
----->8-----

Cat /tmp/acl.log:
-----8<-----
# cat /tmp/acl.log
Start
----->8-----

Whey it never enters the loop? It works if I start it from command line ...

Thanks and best regards

Maik Kündig
Received on Wed Aug 26 2009 - 15:09:38 MDT

This archive was generated by hypermail 2.2.0 : Thu Aug 27 2009 - 12:00:04 MDT