diff --git a/apr-1.7.0-deepbind.patch b/apr-1.7.0-deepbind.patch index 2fb8cd4..ceaa9ab 100644 --- a/apr-1.7.0-deepbind.patch +++ b/apr-1.7.0-deepbind.patch @@ -4,12 +4,25 @@ inside httpd. Use RTLD_DEEPBIND by default. --- apr-1.7.0/dso/unix/dso.c.deepbind +++ apr-1.7.0/dso/unix/dso.c -@@ -123,7 +123,7 @@ - void *os_handle = dlopen((char *)path, RTLD_NOW | RTLD_GLOBAL); +@@ -38,6 +38,8 @@ + #define DYLD_LIBRARY_HANDLE (void *)-1 + #endif ++static int use_deepbind; /* 0 = unset, 1 = use DEEPBIND, -1, don't use DEEPBIND */ ++ + APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso, + apr_os_dso_handle_t osdso, + apr_pool_t *pool) +@@ -125,6 +127,12 @@ #else -- int flags = RTLD_NOW | RTLD_GLOBAL; -+ int flags = RTLD_NOW | RTLD_GLOBAL | RTLD_DEEPBIND; + int flags = RTLD_NOW | RTLD_GLOBAL; void *os_handle; ++ ++ if (use_deepbind == 0) ++ use_deepbind = getenv("APR_DEEPBIND") != NULL ? 1 : -1; ++ if (use_deepbind == 1) ++ flags |= RTLD_DEEPBIND; ++ #ifdef _AIX if (strchr(path + 1, '(') && path[strlen(path) - 1] == ')') + { diff --git a/apr.spec b/apr.spec index b8ab37f..c8aa7d0 100644 --- a/apr.spec +++ b/apr.spec @@ -6,7 +6,7 @@ Summary: Apache Portable Runtime library Name: apr Version: 1.7.0 -Release: 4%{?dist} +Release: 5%{?dist} # ASL 2.0: everything # ISC: network_io/apr-1.4.6/network_io/unix/inet_?to?.c # BSD with advertising: strings/apr_snprintf.c, strings/apr_fnmatch.c, @@ -123,6 +123,9 @@ popd %{_datadir}/aclocal/*.m4 %changelog +* Tue Jun 16 2020 Joe Orton - 1.7.0-5 +- only enable RTLD_DEEPBIND if $APR_DEEPBIND is set + * Wed Mar 4 2020 Joe Orton - 1.7.0-4 - re-enable RTLD_DEEPBIND (#1739287)