[squid-dev] [PATCH] avoid flooding cache.log with "uninitialized value" messages from ext_wbinfo_group_acl helper script
Amos Jeffries
squid3 at treenet.co.nz
Thu Jun 23 17:28:26 UTC 2016
On 23/06/2016 8:01 p.m., Vieri wrote:
>
> I suspect it could be a misconfiguration too.
>
> # grep external /etc/squid/squid.custom.rules
> external_acl_type nt_group ttl=0 children-max=10 %LOGIN /usr/libexec/squid/ext_wbinfo_group_acl
> acl allowed_groups external nt_group "/SAMBA/proxy-settings/allowed.groups"
> acl restricted_groups external nt_group "/SAMBA/proxy-settings/restricted.groups"
>
> Both files are currently empty (/SAMBA/proxy-settings/*).
>
> I'm getting "Sending to squid" messages in the log.
>
Yes. Thats what I suspected.
>
> After populating these files I get these messages:
>
> Sending ERR to squid
> Sending OK to squid
>
>
> My log file is no longer flooded with those "uninitialized variable"
> perl messages anymore. Could this be it? If so, shouldn't it be
> allowed to have empty files (empty acls)? If $group (@groups array)
> is empty then the wbinfo call in the check() function will fail. In
> fact, if the acl files are empty then the "foreach $group (@groups)"
> loop is never entered, the check() function is never called and $ans
> is never set. I know that Squid warns the user at startup if an ACL
> is empty (it only warns about the firt empty ACL declared in
> squid.conf, not all of them).
>
> So it's really my fault if I use empty ACLs that Squid warned me
> about. However, does it hurt to patch the helper script so that $ans
> is 'ERR' by default, even when using empty ACLs?
>
Both OK and ERR results are outcomes of a successful test.
This is a case if the test being broken. So ideally:
my $ans = "BH message=\"No groups configured for membership test\"";
>
> PS: No problem at all. I appreciate the hard work the squid team has
> done during all these years.
Thank you.
Amos
More information about the squid-dev
mailing list