From 7026d23b8fc11d693bf9912177cc6be2ee37c671 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 28 Jun 2013 21:12:38 +0200 Subject: src: Make sure nothing overrides libc symbols. --- src/socket_wrapper.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 70bfb11..f7f5654 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -219,6 +219,11 @@ static void *libc_hnd; static int libc_dlopen(void) { unsigned int i; + int flags = RTLD_LAZY; + +#ifdef RTLD_DEEPBIND + flags |= RTLD_DEEPBIND; +#endif if (libc_hnd != NULL) { return 0; @@ -228,7 +233,7 @@ static int libc_dlopen(void) char soname[256] = {0}; snprintf(soname, sizeof(soname), "%s.%u", LIBC_NAME, i); - libc_hnd = dlopen(soname, RTLD_LAZY); + libc_hnd = dlopen(soname, flags); } if (libc_hnd == NULL) { -- cgit