summaryrefslogtreecommitdiffstats
path: root/recipes-support/openldap/openldap-2.4.39/switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support/openldap/openldap-2.4.39/switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch')
-rw-r--r--recipes-support/openldap/openldap-2.4.39/switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-support/openldap/openldap-2.4.39/switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch b/recipes-support/openldap/openldap-2.4.39/switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch
new file mode 100644
index 0000000..df2801f
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch
@@ -0,0 +1,40 @@
1From: Jan-Marek Glogowski <jan-marek.glogowski@muenchen.de>
2Date: Tue, 18 May 2010 17:47:05 +0200
3Subject: Switch to lt_dlopenadvise() so back_perl can be opened with RTLD_GLOBAL.
4 Open all modules with RTLD_GLOBAL, needed so that back_perl can load
5 non-trivial Perl extensions that require symbols from back_perl.so itself.
6Bug-Debian: http://bugs.debian.org/327585
7
8---
9--- a/servers/slapd/module.c
10+++ b/servers/slapd/module.c
11@@ -117,6 +117,20 @@ int module_unload( const char *file_name
12 return -1; /* not found */
13 }
14
15+static lt_dlhandle slapd_lt_dlopenext_global( const char *filename )
16+{
17+ lt_dlhandle handle = 0;
18+ lt_dladvise advise;
19+
20+ if (!lt_dladvise_init (&advise) && !lt_dladvise_ext (&advise)
21+ && !lt_dladvise_global (&advise))
22+ handle = lt_dlopenadvise (filename, advise);
23+
24+ lt_dladvise_destroy (&advise);
25+
26+ return handle;
27+}
28+
29 int module_load(const char* file_name, int argc, char *argv[])
30 {
31 module_loaded_t *module;
32@@ -180,7 +194,7 @@ int module_load(const char* file_name, i
33 * to calling Debug. This is because Debug is a macro that expands
34 * into multiple function calls.
35 */
36- if ((module->lib = lt_dlopenext(file)) == NULL) {
37+ if ((module->lib = slapd_lt_dlopenext_global(file)) == NULL) {
38 error = lt_dlerror();
39 #ifdef HAVE_EBCDIC
40 strcpy( ebuf, error );