File glibc-nss-deepbind.diff of Package glibc

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 and

Index: nss/nsswitch.c
--- nss/nsswitch.c.orig
+++ nss/nsswitch.c
@@ -358,7 +358,9 @@ __nss_lookup_function (service_user *ni,
-	      ni->library->lib_handle = __libc_dlopen (shlib_name);
+	      ni->library->lib_handle
+		= __libc_dlopen_mode (shlib_name,
 	      if (ni->library->lib_handle == NULL)
 		  /* Failed to load the library.  */
openSUSE Build Service is sponsored by