Re: [squid-users] Bug in wbinfo_group.pl ¿ any idea ?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 13 Apr 2004 17:56:29 +0200 (CEST)

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
Received on Tue Apr 13 2004 - 09:56:37 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Apr 30 2004 - 12:00:02 MDT