This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Increase robustness of internal dlopen() by using RTLD_NOW [BZ #22766]
- From: Tulio Magno Quites Machado Filho <tuliom at linux dot ibm dot com>
- To: libc-alpha at sourceware dot org, szabolcs dot nagy at arm dot com
- Date: Wed, 25 Apr 2018 09:42:56 -0300
- Subject: [PATCH] Increase robustness of internal dlopen() by using RTLD_NOW [BZ #22766]
Prevent random runtime crashes due to missing symbols caused by mixed
libnss_* versions.
2018-04-25 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
[BZ #22766]
* include/dlfcn.h [__libc_dl_open]: Replace RTLD_LAZY with RTLD_NOW.
Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
---
include/dlfcn.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/dlfcn.h b/include/dlfcn.h
index 12ef913e19..2c4bfe86b4 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -32,7 +32,7 @@ extern char **__libc_argv attribute_hidden;
/* Now define the internal interfaces. */
#define __libc_dlopen(name) \
- __libc_dlopen_mode (name, RTLD_LAZY | __RTLD_DLOPEN)
+ __libc_dlopen_mode (name, RTLD_NOW | __RTLD_DLOPEN)
extern void *__libc_dlopen_mode (const char *__name, int __mode);
extern void *__libc_dlsym (void *__map, const char *__name);
extern void *__libc_dlvsym (void *map, const char *name, const char *version);
--
2.14.3