summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Synacek <jsynacek@redhat.com>2013-05-09 07:29:28 (GMT)
committerJan Synacek <jsynacek@redhat.com>2013-05-09 07:29:28 (GMT)
commit05278cd5066d3f531afd05926d8f76a487eb8c64 (patch)
tree26130b478e4ebfba9a510ba4b80787d45c2e1a01
parent6e08d10adfa7a318d668fc66d2c6a8c47152821f (diff)
downloadopenldap-05278cd5066d3f531afd05926d8f76a487eb8c64.zip
openldap-05278cd5066d3f531afd05926d8f76a487eb8c64.tar.gz
openldap-05278cd5066d3f531afd05926d8f76a487eb8c64.tar.xz
fix: lt_dlopen() with back_perl
Resolves: #960048
-rw-r--r--openldap-switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.patch41
-rw-r--r--openldap.spec9
2 files changed, 49 insertions, 1 deletions
diff --git a/openldap-switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.patch b/openldap-switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.patch
new file mode 100644
index 0000000..ed4f2ad
--- /dev/null
+++ b/openldap-switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.patch
@@ -0,0 +1,41 @@
+From: Jan-Marek Glogowski <jan-marek.glogowski@muenchen.de>
+Date: Tue, 18 May 2010 17:47:05 +0200
+Subject: [PATCH] Switch to lt_dlopenadvise() to get RTLD_GLOBAL set.
+
+Proof of concept for fixing http://bugs.debian.org/327585
+(patch ported from freeradius bug http://bugs.debian.org/416266)
+
+Resolves: #960048
+---
+--- openldap/servers/slapd/module.c.orig 2010-05-18 17:42:04.000000000 +0200
++++ openldap/servers/slapd/module.c 2010-05-18 17:45:46.000000000 +0200
+@@ -117,6 +117,20 @@
+ return -1; /* not found */
+ }
+
++static lt_dlhandle slapd_lt_dlopenext_global( const char *filename )
++{
++ lt_dlhandle handle = 0;
++ lt_dladvise advise;
++
++ if (!lt_dladvise_init (&advise) && !lt_dladvise_ext (&advise)
++ && !lt_dladvise_global (&advise))
++ handle = lt_dlopenadvise (filename, advise);
++
++ lt_dladvise_destroy (&advise);
++
++ return handle;
++}
++
+ int module_load(const char* file_name, int argc, char *argv[])
+ {
+ module_loaded_t *module;
+@@ -180,7 +194,7 @@
+ * to calling Debug. This is because Debug is a macro that expands
+ * into multiple function calls.
+ */
+- if ((module->lib = lt_dlopenext(file)) == NULL) {
++ if ((module->lib = slapd_lt_dlopenext_global(file)) == NULL) {
+ error = lt_dlerror();
+ #ifdef HAVE_EBCDIC
+ strcpy( ebuf, error );
diff --git a/openldap.spec b/openldap.spec
index e3ba84b..616c535 100644
--- a/openldap.spec
+++ b/openldap.spec
@@ -42,9 +42,14 @@ Patch13: openldap-nss-regex-search-hashed-cacert-dir.patch
Patch14: openldap-nss-ignore-certdb-type-prefix.patch
Patch15: openldap-nss-certs-from-certdb-fallback-pem.patch
Patch16: openldap-nss-pk11-freeslot.patch
-# pending upstream inclusion
+# documentation patches, already included upstream
Patch17: openldap-doc1.patch
Patch18: openldap-doc2.patch
+# fix back_perl problems with lt_dlopen()
+# might cause crashes because of symbol collisions
+# the proper fix is to link all perl modules against libperl
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585
+Patch19: openldap-switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.patch
# Fedora specific patches
Patch100: openldap-autoconf-pkgconfig-nss.patch
@@ -162,6 +167,7 @@ AUTOMAKE=%{_bindir}/true autoreconf -fi
%patch16 -p1
%patch17 -p1
%patch18 -p1
+%patch19 -p1
%patch102 -p1
@@ -593,6 +599,7 @@ exit 0
%changelog
* Thu May 09 2013 Jan Synáček <jsynacek@redhat.com> 2.4.35-4
- do not needlessly run ldconfig after installing openldap-devel
+- fix: lt_dlopen() with back_perl (#960048)
* Tue Apr 09 2013 Jan Synáček <jsynacek@redhat.com> 2.4.35-3
- fix: minor documentation fixes