]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
ext_wbinfo_group_acl: Perl 5.20 syntax errors
authordrserge <drserge@inbox.ru>
Thu, 19 Feb 2015 03:00:51 +0000 (19:00 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 19 Feb 2015 03:00:51 +0000 (19:00 -0800)
With Perl 5.20 the helper exits with many errors similar to:

  Global symbol "$groupSID" requires explicit package name at
    /usr/libexec/squid/ext_wbinfo_group_acl

helpers/external_acl/wbinfo_group/ext_wbinfo_group_acl.pl.in

index 5570f1a1df164c2b71a9dc0b95c13d925ca0349a..028fb2045528e13d8c977e03cd3987156643c556 100755 (executable)
@@ -121,6 +121,11 @@ The Squid Configuration Manual http://www.squid-cache.org/Doc/config/
 #
 use vars qw/ %opt /;
 
+my $user;
+my $group;
+my @groups;
+my $ans;
+
 # Disable output buffering
 $|=1;
 
@@ -132,7 +137,11 @@ sub debug {
 # Check if a user belongs to a group
 #
 sub check {
-        local($user, $group) = @_;
+       my $groupSID;
+       my $groupGID;
+       my @tmpuser;
+
+       our($user, $group) = @_;
        if ($opt{K} && ($user =~ m/\@/)) {
                @tmpuser = split(/\@/, $user);
                $user = "$tmpuser[1]\\$tmpuser[0]";