SOURCES: openldap-gethostbyXXXX_r.patch (NEW), openldap-pie.patch ...
baggins
baggins at pld-linux.org
Fri Nov 2 17:51:59 CET 2007
Author: baggins Date: Fri Nov 2 16:51:59 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fixes from FC, description inside
---- Files affected:
SOURCES:
openldap-gethostbyXXXX_r.patch (NONE -> 1.1) (NEW), openldap-pie.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/openldap-gethostbyXXXX_r.patch
diff -u /dev/null SOURCES/openldap-gethostbyXXXX_r.patch:1.1
--- /dev/null Fri Nov 2 17:51:59 2007
+++ SOURCES/openldap-gethostbyXXXX_r.patch Fri Nov 2 17:51:54 2007
@@ -0,0 +1,28 @@
+The non-reentrant gethostbyXXXX() functions deadlock if called recursively, for
+example if libldap needs to be initialized from within gethostbyXXXX() (which
+actually happens if nss_ldap is used for hostname resolution and earlier
+modules can't resolve the local host name), so use the reentrant versions of
+the functions, even if we're not being compiled for use in libldap_r (patch
+from Jeffery Layton, #179730).
+--- openldap-2.3.19/libraries/libldap/util-int.c 2006-02-23 15:42:14.000000000 -0500
++++ openldap-2.3.19/libraries/libldap/util-int.c 2006-02-23 15:42:02.000000000 -0500
+@@ -52,8 +52,8 @@
+ #ifndef LDAP_R_COMPILE
+ # undef HAVE_REENTRANT_FUNCTIONS
+ # undef HAVE_CTIME_R
+-# undef HAVE_GETHOSTBYNAME_R
+-# undef HAVE_GETHOSTBYADDR_R
++/* # undef HAVE_GETHOSTBYNAME_R */
++/* # undef HAVE_GETHOSTBYADDR_R */
+
+ #else
+ # include <ldap_pvt_thread.h>
+@@ -110,7 +110,7 @@
+ #define BUFSTART (1024-32)
+ #define BUFMAX (32*1024-32)
+
+-#if defined(LDAP_R_COMPILE)
++#if defined(LDAP_R_COMPILE) || defined(HAVE_GETHOSTBYNAME_R) && defined(HAVE_GETHOSTBYADDR_R)
+ static char *safe_realloc( char **buf, int len );
+
+ #if !(defined(HAVE_GETHOSTBYNAME_R) && defined(HAVE_GETHOSTBYADDR_R))
================================================================
Index: SOURCES/openldap-pie.patch
diff -u /dev/null SOURCES/openldap-pie.patch:1.1
--- /dev/null Fri Nov 2 17:51:59 2007
+++ SOURCES/openldap-pie.patch Fri Nov 2 17:51:54 2007
@@ -0,0 +1,26 @@
+Build both slapd and slurpd as position-independent executables. This really
+should be threaded into the various autotools, but I guess this is what we have
+until that happens, if it happens.
+
+--- openldap-2.2.13/servers/slapd/Makefile.in 2004-04-12 14:07:40.000000000 -0400
++++ openldap-2.2.13/servers/slapd/Makefile.in 2004-06-15 13:45:45.000000000 -0400
+@@ -255,7 +255,7 @@
+ cp slapi/.libs/libslapi.a .
+
+ slapd: $(SLAPD_DEPENDS) @LIBSLAPI@
+- $(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) \
++ $(LTLINK) -pie -Wl,-z,defs -o $@ $(SLAPD_OBJECTS) $(LIBS) \
+ $(WRAP_LIBS)
+ rm -f $(SLAPTOOLS)
+ for i in $(SLAPTOOLS); do \
+--- openldap-2.2.13/servers/slurpd/Makefile.in 2004-01-01 13:16:42.000000000 -0500
++++ openldap-2.2.13/servers/slurpd/Makefile.in 2004-06-15 13:44:45.000000000 -0400
+@@ -44,7 +44,7 @@
+ XXXLIBS = $(LTHREAD_LIBS)
+
+ slurpd: version.o
+- $(LTLINK) -o $@ $(OBJS) version.o $(LIBS)
++ $(LTLINK) -pie -Wl,-z,defs -o $@ $(OBJS) version.o $(LIBS)
+
+ sslurpd: version.o
+ $(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS)
================================================================
More information about the pld-cvs-commit
mailing list