[Pkg-openldap-devel] libldap_r

Steve Langasek vorlon at debian.org
Sat Jan 5 09:44:51 UTC 2008


On Thu, Dec 20, 2007 at 10:43:48PM -0800, Russ Allbery wrote:
> I'd really like to sort out the libldap_r thing, since what we're doing
> right now is one of those sorts of things that I'm sure upstream would say
> that we shouldn't do and we're just creating problems by doing.

> So, could you check this for accuracy so that I can correctly represent
> the problem that we're trying to solve to upstream and get their take on
> how we *should* solve it?

>     Currently, OpenLDAP installs both a libldap and a libldap_r library,
>     the latter used by slapd.  The symbols provided by the two libraries
>     overlap.  This creates a problem when both libraries are loaded into
>     the same process space, such as on a system that uses an LDAP NSS
>     module and hence loads libldap into slapd's process space when slapd
>     makes a getpwnam() call (to implement the -u flag, for example).

Well, since nss_ldap gets used by all applications, it needs to be linked
against the thread-safe version of libldap, even though most apps are going
to be looking for plain -lldap.  So the scope of this is far beyond slapd;
indeed, slapd is one app that should not be affected by this particular
issue.

>     We've avoided this in the past by not installing libldap and instead
>     making it a link to libldap_r, so that everyone gets the libldap_r
>     version.  However, this is just the sort of fiddling with how OpenLDAP
>     normally works that we'd like to stop doing.

>     What's the best solution to the underlying symbol conflict concern?
>     Or, alternately, why is what we're worried about not actually a
>     problem?

> When we get a summary that accurately reflects our issue, I'll raise it on
> openldap-software and see what upstream says.

The right answer is to get the server stuff out of libldap so that we can
(on GNU systems) get a thread-safe libldap that doesn't have to link to
libpthread.  Let's hope upstream sees it that way... :)

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org



More information about the Pkg-openldap-devel mailing list