On Mon, 12 Apr 2004, Jim Richey wrote:

> I have found two problems in the wbinfo_group.pl. One is that the script
> does not give the full path to wbinfo.


This is intentional and not a bug. You should make sure your PATH includes
the Samba bin directory.

The path to wbinfo varies greatly with how Samba was installed on your
server, and PATH is the natural way of handling this.

> The second is that if wbinfo cannot be found or reports an error, the
> script still returns an OK back to squid.


This is a bug. Please file a bug report.

This results in everyone
> getting access whether they are a member of the group or not. I have
> modified it for our purposes as follows:
>
> diff wbinfo_group.pl hm_wbinfo_group.pl
> 35c35
> < $groupSID = `wbinfo -n "$group"`;
> ---
> > $groupSID = `/usr/local/samba/bin/wbinfo -n "$group"`;

> 37c37
> < $groupGID = `wbinfo -Y "$groupSID"`;
> ---
> > $groupGID = `/usr/local/samba/bin/wbinfo -Y "$groupSID"`;

> 40c40,46
> < return 'OK' if(`wbinfo -r \Q$user\E` =~ /^$groupGID$/m);
> ---
> > $groupmem = `/usr/local/samba/bin/wbinfo -r $user`;
> > if ($groupmem) {
> > $groupchk = ($groupmem =~ /^$groupGID$/m);
> > if ($groupchk) {
> > return 'OK';
> > }
> > }



Doesn't this check belong in the first call?

Regards
Henrik