Re: LDAP issues (and some fixes)



On 2001.04.30 06:38 Pawel Salek wrote:
> 
> On 2001-04-29 02:17 Thomas LeRoux wrote:
> > COMPILATION PROBLEMS: First off, I'm using OpenLDAP 2.0.7, and it
> > seems as if the Balsa configuration script does not include
> > libresolv.so (-lresolv) when compiling its LDAP test program.  Not
> > sure why, but I'm guessing this is a new requirement for OpenLDAP.  
> 
> I have just tested linking against openldap-2.0.7 on my RH Linux box
> (ix86), and haven't experienced any problems. could it be it is
> distribution depedent (you didn't mention if you use linux or other unix
> system)? In principle, I don't see a problem with adding -lresolv, I
> would just like to know clearly why it has to be done.


Slackware 7.1.0.  Looks like my libldap.so needs libresolv.so (openldap
uses res_query and dn_expand in dnssrv.c).

> 
> > DISPLAY NAME PROBLEMS: Once compiled, the Address book worked fairly
> > well when querying my LDAP directory.  However, once I selected a name
> > from the list, the display name on the email only shows "Lastname
> > <foobar@host.com>"
> > instead of "Firstname Lastname <foobar@host.com>".  I took a quick
> > look, and it seems as if Balsa is not using the "cn" (Common Name)
> > attribute for the display name.  It's using the "sn" (Surname) and
> > "givenName" (First name) attributes concatenated.  However, since "cn"
> > is a required attribute, and since it was always intended to be the
> > first name, I feel this attribute is more correct (since I don't even
> > use the "givenName" attribute, I was only getting last names).  I
> > think someone else was having this problem as seen in the list
> > archives.  This fix is included in the patch attached.
> 
> This sounds right. If I don't get any objections from Berend, I will
> commit this part.
> 
> >   I believe this also resolves bug # 29254.
> 
> In bugzilla.gnome.org!? I could not find it.

Hmmmmm.. it was in http://bugs.gnome.org/db/pa/lbalsa.html, however, I
can't seem to get into that link now.. I get a "Forbidden" HTTP response.

> 
> > CACHE PROBLEMS: Ahhggg!!!  This one drove me NUTS until I (sortof)
> > anyway, as any LDAP delays will not affect the app thread.  That is, a
> > 60
> > second LDAP query won't freeze the app.  Regardless, I've commented
> > out the
> > client side cache in my patch - feel free to ignore this change.
> 
> Actually, I recall that I had some problems with caching as well when I
> tested this part of the code - but it was long time ago and I don't
> remember much. But the symptoms seem familiar.
> 

When (if!) I have some time I'll take a more in depth look at this.

> Thanks a lot for your comments and for the patch.
> 

No sweat..

-Tom





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]