[SCM] UID Wrapper Repository - branch master updated

Andreas Schneider asn at samba.org
Wed Jun 12 18:41:03 UTC 2024


The branch, master has been updated
       via  184e610 Bump version to 1.3.1
       via  4127ba0 src: use LIBC_SO from GNU libc, if available
       via  16c0212 src/uid_wrapper.c: Fix typo of 'Initialize.'
      from  3916f98 uwrap: Fix syscall() with jemalloc to prevent a deadlock

https://git.samba.org/?p=uid_wrapper.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 184e61007f60c644e8841c8fbca1acd6bff7fad8
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jun 12 15:51:35 2024 +0200

    Bump version to 1.3.1
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 4127ba0298b1ebd220c8555b2a785d6cc8084fca
Author: Pino Toscano <toscano.pino at tiscali.it>
Date:   Fri May 30 19:06:10 2014 +0200

    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.
    
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 16c0212f128ab1aba706422f437c585d714c6a48
Author: Simon Josefsson <simon at josefsson.org>
Date:   Fri Aug 4 10:48:45 2023 +0200

    src/uid_wrapper.c: Fix typo of 'Initialize.'
    
    Signed-off-by: Simon Josefsson <simon at josefsson.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 CHANGELOG             |  6 ++++++
 CMakeLists.txt        |  4 ++--
 ConfigureChecks.cmake |  1 +
 config.h.cmake        |  1 +
 src/uid_wrapper.c     | 13 ++++++++++++-
 5 files changed, 22 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/CHANGELOG b/CHANGELOG
index 92542f5..40a33c6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,12 @@
 CHANGELOG
 =========
 
+version 1.3.1 (released 2024-06-12)
+  * Added support to find libc via LIBC_SO define
+  * Fixed uid_wrapper running with jemalloc compiled binaries
+  * Fixed socket_wrapper interaction test
+  * Fixed thread sanitizer on modern Linux Kernels
+
 version 1.3.0 (released 2023-01-17)
   * Added support to interact with socket_wrapper syscall()
   * Fixed deadlocks with threads
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1523bd7..14215c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
 include(DefineCMakeDefaults)
 include(DefineCompilerFlags)
 
-project(uid_wrapper VERSION 1.3.0 LANGUAGES C)
+project(uid_wrapper VERSION 1.3.1 LANGUAGES C)
 
 # global needed variables
 set(APPLICATION_NAME ${PROJECT_NAME})
@@ -23,7 +23,7 @@ set(APPLICATION_NAME ${PROJECT_NAME})
 #     Increment AGE. Set REVISION to 0
 #   If the source code was changed, but there were no interface changes:
 #     Increment REVISION.
-set(LIBRARY_VERSION "0.2.0")
+set(LIBRARY_VERSION "0.2.1")
 set(LIBRARY_SOVERSION "0")
 
 # add definitions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 3201131..6294b23 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -48,6 +48,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 dde70ec..97521f8 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -14,6 +14,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 4a174e1..ca578e6 100644
--- a/src/uid_wrapper.c
+++ b/src/uid_wrapper.c
@@ -38,6 +38,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
@@ -558,6 +562,13 @@ static void *uwrap_load_lib_handle(enum uwrap_lib lib)
 	switch (lib) {
 	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 (i = 10; i >= 0; i--) {
 				char soname[256] = {0};
@@ -1400,7 +1411,7 @@ static void uwrap_init_env(struct uwrap_thread *id)
 			exit(-1);
 		}
 
-		UWRAP_LOG(UWRAP_LOG_DEBUG, "Initalize groups with %s", env);
+		UWRAP_LOG(UWRAP_LOG_DEBUG, "Initialize groups with %s", env);
 		id->ngroups = ngroups;
 	}
 }


-- 
UID Wrapper Repository



More information about the samba-cvs mailing list