SHA256
3
0
forked from pool/glibc
glibc/glibc-nss-deepbind.diff
OBS User autobuild 35b77f97b8 Accepting request 24314 from Base:System
Copy from Base:System/glibc based on submit request 24314 from user pbaudis

OBS-URL: https://build.opensuse.org/request/show/24314
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=13
2009-11-16 08:54:19 +00:00

27 lines
1.0 KiB
Diff

Use DEEPBIND to load the nss modules. Helps thunderbird (linked against its
own version of the ldap libs) when using nss_ldap (linked against system
libldap) leading to crashes due to incompatibilities.
This has a downside: Linking against libraries overriding malloc() and free()
will break (unless the malloc()'d pointers by glibc are free()able by these).
This is fixable in principle, just needs some work.
See https://bugzilla.novell.com/show_bug.cgi?id=157078 and
http://sourceware.org/bugzilla/show_bug.cgi?id=6610
Index: nss/nsswitch.c
===================================================================
--- nss/nsswitch.c.orig
+++ nss/nsswitch.c
@@ -361,7 +361,9 @@ __nss_lookup_function (service_user *ni,
".so"),
__nss_shlib_revision);
- ni->library->lib_handle = __libc_dlopen (shlib_name);
+ ni->library->lib_handle
+ = __libc_dlopen_mode (shlib_name,
+ RTLD_LAZY | __RTLD_DLOPEN | RTLD_DEEPBIND);
if (ni->library->lib_handle == NULL)
{
/* Failed to load the library. */