From: hno <> Date: Thu, 30 Jun 2005 02:38:59 +0000 (+0000) Subject: Bug #1333: binfo_group.pl only looks into the first group specified X-Git-Tag: SQUID_3_0_PRE4~718 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d617cf181b771260d27ab72a0d2ac89ad61585fd;p=thirdparty%2Fsquid.git Bug #1333: binfo_group.pl only looks into the first group specified --- diff --git a/helpers/external_acl/wbinfo_group/wbinfo_group.pl b/helpers/external_acl/wbinfo_group/wbinfo_group.pl index d03a333571..3c72c409b8 100644 --- a/helpers/external_acl/wbinfo_group/wbinfo_group.pl +++ b/helpers/external_acl/wbinfo_group/wbinfo_group.pl @@ -17,6 +17,9 @@ # 2002-07-05 Jerry Murdock # Initial release # +# 2005-06-28 Arno Streuli +# Add multi group check + # Disable output buffering $|=1; @@ -46,9 +49,14 @@ sub check { while () { chop; &debug ("Got $_ from squid"); - ($user, $group) = split(/\s+/); + ($user, @groups) = split(/\s+/); $user =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("c",hex($1))/eg; - $group =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("c",hex($1))/eg; + # test for each group squid send in it's request + foreach $group (@groups) { + $group =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("c",hex($1))/eg; + $ans = &check($user, $group); + last if $ans eq "OK"; + } $ans = &check($user, $group); &debug ("Sending $ans to squid"); print "$ans\n";