The Samba-Bugzilla – Attachment 9997 Details for
Bug 10572
swrap_load_lib_handle() broken on GNU/kFreeBSD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
uid_wrapper: use LIBC_SO
0001-src-use-LIBC_SO-from-GNU-libc-if-available.patch (text/plain), 1.97 KB, created by
Pino Toscano
on 2014-05-30 17:07:27 UTC
(
hide
)
Description:
uid_wrapper: use LIBC_SO
Filename:
MIME Type:
Creator:
Pino Toscano
Created:
2014-05-30 17:07:27 UTC
Size:
1.97 KB
patch
obsolete
>From 939c8edd9763ad5ffc62767b2b51549736fcaa20 Mon Sep 17 00:00:00 2001 >From: Pino Toscano <toscano.pino@tiscali.it> >Date: Fri, 30 May 2014 19:06:10 +0200 >Subject: [PATCH] src: use LIBC_SO from GNU libc, if available > >Look for gnu/lib-names.h and use the LIBC_SO define to dlopen libc, so >the right library is loaded without manually searching for libc.so.N. >--- > ConfigureChecks.cmake | 1 + > config.h.cmake | 1 + > src/uid_wrapper.c | 11 +++++++++++ > 3 files changed, 13 insertions(+) > >diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake >index 123128f..4848d28 100644 >--- a/ConfigureChecks.cmake >+++ b/ConfigureChecks.cmake >@@ -52,6 +52,7 @@ check_include_file(sys/syscall.h HAVE_SYS_SYSCALL_H) > check_include_file(syscall.h HAVE_SYSCALL_H) > check_include_file(grp.h HAVE_GRP_H) > check_include_file(unistd.h HAVE_UNISTD_H) >+check_include_file(gnu/lib-names.h HAVE_GNU_LIB_NAMES_H) > > # FUNCTIONS > check_function_exists(strncpy HAVE_STRNCPY) >diff --git a/config.h.cmake b/config.h.cmake >index 0e67b23..7c2d6df 100644 >--- a/config.h.cmake >+++ b/config.h.cmake >@@ -19,6 +19,7 @@ > #cmakedefine HAVE_SYSCALL_H 1 > #cmakedefine HAVE_UNISTD_H 1 > #cmakedefine HAVE_GRP_H 1 >+#cmakedefine HAVE_GNU_LIB_NAMES_H 1 > > /*************************** FUNCTIONS ***************************/ > >diff --git a/src/uid_wrapper.c b/src/uid_wrapper.c >index e9c7d5a..4c7b526 100644 >--- a/src/uid_wrapper.c >+++ b/src/uid_wrapper.c >@@ -37,6 +37,10 @@ > > #include <pthread.h> > >+#ifdef HAVE_GNU_LIB_NAMES_H >+#include <gnu/lib-names.h> >+#endif >+ > #ifdef HAVE_GCC_THREAD_LOCAL_STORAGE > # define UWRAP_THREAD __thread > #else >@@ -205,6 +209,13 @@ static void *uwrap_load_lib_handle(enum uwrap_lib lib) > /* FALL TROUGH */ > case UWRAP_LIBC: > handle = uwrap.libc.handle; >+#ifdef LIBC_SO >+ if (handle == NULL) { >+ handle = dlopen(LIBC_SO, flags); >+ >+ uwrap.libc.handle = handle; >+ } >+#endif > if (handle == NULL) { > for (handle = NULL, i = 10; handle == NULL && i >= 0; i--) { > char soname[256] = {0}; >-- >2.0.0.rc2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 10572
:
9923
|
9924
|
9925
|
9996
| 9997