samba-users August 2010 archive
Main Archive Page > Month Archives  > samba-users archives
samba-users: [Samba] wbinfo_group.pl and spaces in group names

[Samba] wbinfo_group.pl and spaces in group names

From: Neil Price <nprice_at_nospam>
Date: Fri Aug 27 2010 - 08:54:28 GMT
To: samba@lists.samba.org

  Hi, I;m using wbinfo_group.pl from samba 3.4.8 for squid ntlm
authentication because I'm using multiple samba groups

squid version is 2.7 from debian Lenny

squid.conf contains:

external_acl_type nt_group ttl=0 children=5 %LOGIN
/usr/lib/squid/wbinfo_group.pl -d
acl AuthorizedUsers proxy_auth REQUIRED
acl internet external nt_group "/etc/squid/allowed-groups"
http_access deny !internet

Allowed groups contains

LAWCO\Internet%20Users
GIBB\Computer

This tests fine from command line
echo "lawco\\nprice
lawco\\Internet%20users"|/usr/lib/squid/wbinfo_group.pl -d

But from squid it does not work, it seems that squid escapes the escape.

I changed wbinfo_group.pl

         foreach $group (@groups) {
                 $group =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("c",hex($1))/eg;
                 #this next line added by me
                 $group =~ s/%20/ /;
                 $ans = &check($user, $group);
                 last if $ans eq "OK";
         }

Probably horrify perl purists but it works for me. Hope this helps someone.

-- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba