Skip to content

Commit ced06f8

Browse files
committed
Re-enable RTLD_DEEPBIND when on apache for a different reason
1 parent fe18f08 commit ced06f8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Zend/zend_portability.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164

165165
# if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
166166
# define DL_LOAD(libname) dlopen(libname, PHP_RTLD_MODE | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
167-
# elif defined(RTLD_DEEPBIND) && !defined(__SANITIZE_ADDRESS__) && !__has_feature(memory_sanitizer) && !defined(LM_ID_NEWLM)
167+
# elif defined(RTLD_DEEPBIND) && !defined(__SANITIZE_ADDRESS__) && !__has_feature(memory_sanitizer) && (!defined(LM_ID_NEWLM) || defined(PHP_USE_RTLD_DEEPBIND))
168168
# define DL_LOAD(libname) dlopen(libname, PHP_RTLD_MODE | RTLD_GLOBAL | RTLD_DEEPBIND)
169169
# else
170170
# define DL_LOAD(libname) dlopen(libname, PHP_RTLD_MODE | RTLD_GLOBAL)

sapi/apache2handler/config.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ PHP_ARG_WITH([apxs2],
77
[no])
88

99
if test "$PHP_APXS2" != "no"; then
10+
AC_DEFINE(PHP_USE_RTLD_DEEPBIND, 1, [ Use dlopen with RTLD_DEEPBIND instead of delegating isolation to the user via dlmopen ])
1011
AS_VAR_IF([PHP_APXS2], [yes], [
1112
APXS=apxs
1213
$APXS -q CFLAGS >/dev/null 2>&1

0 commit comments

Comments
 (0)