diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-06-28 21:12:38 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-06-28 21:12:38 +0200 |
commit | 7026d23b8fc11d693bf9912177cc6be2ee37c671 (patch) | |
tree | 269f19b2764005cd840da9b5c9b9234c661763d8 | |
parent | ff0f8a5c35652c0218219cf1fed4a3437e6ab8a3 (diff) | |
download | socket_wrapper-7026d23b8fc11d693bf9912177cc6be2ee37c671.tar.gz socket_wrapper-7026d23b8fc11d693bf9912177cc6be2ee37c671.tar.xz socket_wrapper-7026d23b8fc11d693bf9912177cc6be2ee37c671.zip |
src: Make sure nothing overrides libc symbols.
-rw-r--r-- | src/socket_wrapper.c | 7 |
1 files changed, 6 insertions, 1 deletions
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) { |