On Wed, Mar 07, 2012 at 03:44:23PM +1300, Amos Jeffries wrote:
>
> cache_peer option of "login=PASS", with the external_acl_type helper
> returning values in both user= and password= parameters.
>
OK, I must be doing something dumb. I have the following in the config:
cache_peer upstream.parent parent 8080 7 login=PASS no-query default
external_acl_type user_rewrite_type children=1 ttl=900 %LOGIN /opt/local/squid/bin/user_rewrite.pl
acl user_rewrite external user_rewrite_type
cache_peer_access upstream.parent allow user_rewrite
But if I do an ACL debug I see:
2012/03/07 14:11:47.666| aclMatchExternal: "blymn": entry=@0, age=0
2012/03/07 14:11:47.666| aclMatchExternal: "blymn": queueing a call.
2012/03/07 14:11:47.666| aclMatchExternal: "blymn": return -1.
2012/03/07 14:11:47.667| aclMatchExternal: acl="user_rewrite_type"
2012/03/07 14:11:47.667| aclMatchExternal: user_rewrite_type("blymn") = lookup needed
It seems like squid wants to call the external acl but it is not
happening.
user_rewrite.pl is in the right spot and contains:
#!/usr/bin/perl
#
$|=1;
open LOG,">/tmp/rewrite_log";
while (<STDIN>) {
$username = $_;
chomp $username;
print LOG "Have username >$username<\n";
$username =~ s/^([A-Za-z]+)%5[cC]//;
($username, $blah) = split('@', $username);
print LOG "returning OK user=$username password=special\n";
print "OK user=$username password=special\n";
}
Nothing ever gets into /tmp/rewrite_log and doing an strace on the
process shows no activity.
-- Brett Lymn "Warning: The information contained in this email and any attached files is confidential to BAE Systems Australia. If you are not the intended recipient, any use, disclosure or copying of this email or any attachments is expressly prohibited. If you have received this email in error, please notify us immediately. VIRUS: Every care has been taken to ensure this email and its attachments are virus free, however, any loss or damage incurred in using this email is not the sender's responsibility. It is your responsibility to ensure virus checks are completed before installing any data sent in this email to your computer."Received on Wed Mar 07 2012 - 03:50:07 MST
This archive was generated by hypermail 2.2.0 : Wed Mar 07 2012 - 12:00:02 MST