[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Mon Jul 8 06:29:01 UTC 2024


The branch, master has been updated
       via  2a6805cc823 third_party: Update nss_wrapper to version 1.1.16
      from  90c9d0d98d3 s3:ntlm_auth: make logs more consistent with length check

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


- Log -----------------------------------------------------------------
commit 2a6805cc8235ef081f92ad9b6efaab6cbe02bd0d
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Jul 5 13:09:53 2024 +0200

    third_party: Update nss_wrapper to version 1.1.16
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Mon Jul  8 06:28:47 UTC 2024 on atb-devel-224

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

Summary of changes:
 buildtools/wafsamba/samba_third_party.py |  2 +-
 third_party/nss_wrapper/nss_wrapper.c    | 29 ++++++++++++++++++++++++++---
 third_party/nss_wrapper/wscript          |  3 ++-
 3 files changed, 29 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py
index a42bb2ddc90..96484893b2f 100644
--- a/buildtools/wafsamba/samba_third_party.py
+++ b/buildtools/wafsamba/samba_third_party.py
@@ -29,7 +29,7 @@ Build.BuildContext.CHECK_SOCKET_WRAPPER = CHECK_SOCKET_WRAPPER
 
 @conf
 def CHECK_NSS_WRAPPER(conf):
-    return conf.CHECK_BUNDLED_SYSTEM_PKG('nss_wrapper', minversion='1.1.15')
+    return conf.CHECK_BUNDLED_SYSTEM_PKG('nss_wrapper', minversion='1.1.16')
 Build.BuildContext.CHECK_NSS_WRAPPER = CHECK_NSS_WRAPPER
 
 @conf
diff --git a/third_party/nss_wrapper/nss_wrapper.c b/third_party/nss_wrapper/nss_wrapper.c
index 3399f06412a..770d0cf5ddd 100644
--- a/third_party/nss_wrapper/nss_wrapper.c
+++ b/third_party/nss_wrapper/nss_wrapper.c
@@ -61,6 +61,10 @@
 #include <search.h>
 #include <assert.h>
 
+#ifdef HAVE_GNU_LIB_NAMES_H
+#include <gnu/lib-names.h>
+#endif
+
 #include "nss_utils.h"
 /*
  * Defining _POSIX_PTHREAD_SEMANTICS before including pwd.h and grp.h  gives us
@@ -1156,6 +1160,13 @@ static void *nwrap_load_lib_handle(enum nwrap_lib lib)
 	case NWRAP_LIBNSL:
 #ifdef HAVE_LIBNSL
 		handle = nwrap_main_global->libc->nsl_handle;
+#ifdef LIBNSL_SO
+		if (handle == NULL) {
+			handle = dlopen(LIBNSL_SO, flags);
+
+			nwrap_main_global->libc->nsl_handle = handle;
+		}
+#endif
 		if (handle == NULL) {
 			for (i = 10; i >= 0; i--) {
 				char soname[256] = {0};
@@ -1193,6 +1204,13 @@ static void *nwrap_load_lib_handle(enum nwrap_lib lib)
 		/* FALL TROUGH */
 	case NWRAP_LIBC:
 		handle = nwrap_main_global->libc->handle;
+#ifdef LIBC_SO
+		if (handle == NULL) {
+			handle = dlopen(LIBC_SO, flags);
+
+			nwrap_main_global->libc->handle = handle;
+		}
+#endif
 		if (handle == NULL) {
 			for (i = 10; i >= 0; i--) {
 				char soname[256] = {0};
@@ -2422,6 +2440,13 @@ static bool nwrap_pw_parse_line(struct nwrap_cache *nwrap, char *line)
 		return false;
 	}
 	*p = '\0';
+#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
+	/*
+	 * We don't support pw_class, so just let it point to
+	 * an '\0' byte (empty string).
+	 */
+	pw->pw_class = p;
+#endif /* HAVE_STRUCT_PASSWD_PW_CLASS */
 	p++;
 	e = NULL;
 	pw->pw_gid = (gid_t)strtoul(c, &e, 10);
@@ -2448,8 +2473,6 @@ static bool nwrap_pw_parse_line(struct nwrap_cache *nwrap, char *line)
 	NWRAP_LOG(NWRAP_LOG_TRACE, "gid[%u]\n", pw->pw_gid);
 
 #ifdef HAVE_STRUCT_PASSWD_PW_CLASS
-	pw->pw_class = discard_const_p(char, "");
-
 	NWRAP_LOG(NWRAP_LOG_TRACE, "class[%s]", pw->pw_class);
 #endif /* HAVE_STRUCT_PASSWD_PW_CLASS */
 
@@ -6531,7 +6554,7 @@ void nwrap_destructor(void)
 		}
 
 		SAFE_FREE(nwrap_gr_global.list);
-		nwrap_pw_global.num = 0;
+		nwrap_gr_global.num = 0;
 	}
 
 #if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM)
diff --git a/third_party/nss_wrapper/wscript b/third_party/nss_wrapper/wscript
index 28aeb510719..a8228a006cc 100644
--- a/third_party/nss_wrapper/wscript
+++ b/third_party/nss_wrapper/wscript
@@ -2,7 +2,7 @@
 
 import os
 
-VERSION="1.1.15"
+VERSION="1.1.16"
 
 def configure(conf):
     if conf.CHECK_NSS_WRAPPER():
@@ -10,6 +10,7 @@ def configure(conf):
         libnss_wrapper_so_path = 'libnss_wrapper.so'
     else:
         conf.CHECK_HEADERS('nss.h')
+        conf.CHECK_HEADERS('gnu/lib-names.h')
 
         if conf.CONFIG_SET("HAVE___THREAD"):
             conf.DEFINE("HAVE_GCC_THREAD_LOCAL_STORAGE", 1)


-- 
Samba Shared Repository



More information about the samba-cvs mailing list