Following the posts from
RaphaelWeis and me on this page (on 4th of january 2008):
http://www.twiki.org/cgi-bin/view/Plugins/LdapContribDev
There is a strang eproblem with getting the groups out of ldap I think the problems lies here in the code:
my $result = $this->refreshUsersCache(\%tempData);
if (defined($result) && $this->{mapGroups}) {
$result ||= $this->refreshGroupsCache(\%tempData);
}
after some small debugging efforts I figured out that:
the if branch is excuted, but refreshGroupsCache() doesn't get called
--
TWiki:Main/MarcoRomano
- 06 Jan 2008
The function
refreshUserCache()
will return
undef
if there was an LDAP error. In that case
defined($result)
is false and the groups are not refreshed. Please enable debugging and try once again.
--
TWiki:Main.MichaelDaum
- 07 Jan 2008
Argh ...
--
TWiki:Main.MichaelDaum
- 07 Jan 2008
I enabled debugging and I have the same behavior as
RaphaelWeis on hi 04 Jan 2008 Post.
I tried to change this line:
$result ||= $this->refreshGroupsCache(\%tempData);
with:
$result = $this->refreshGroupsCache(\%tempData);
and the nthe refreshGroupsCache gets correctly executed and from debug info I can see my groups being downloaded from ldap. What's wrong here?
--
TWiki:Main.MarcoRomano
- 07 Jan 2008
To answer your first question:
there is no ldap error, I can verify from the debugging infos that refreshUserCache() gets properly called and found many entries (my users).
Thanks you for you patience.
--
TWiki:Main.MarcoRomano
- 07 Jan 2008
Found the error. Releasing the fix in v2.1.1
--
TWiki:Main.MichaelDaum
- 07 Jan 2008
Sorry, same problem, here's the debug output:
updating cache
called refreshCache
called refreshUsersCache()
called search(filter=objectClass=posixAccount, base=ou=Users,dc=rovernet,dc=local, scope=sub, limit=0, attrs=uid,mail,cn)
proxy bind
found 59 entries
done reading pages
got 59 keys in cache
flushing db to disk
replacing working copy
--
TWiki:Main.MarcoRomano
- 07 Jan 2008
wait wait, I failed to applye the 2.1.1 upgrade. I'll be back in a minute
--
TWiki:Main.MarcoRomano
- 07 Jan 2008
Yeah! Working like a charm! Thanks Michael
--
TWiki:Main.MarcoRomano
- 07 Jan 2008