[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri Jun 24 22:30:01 UTC 2022


The branch, master has been updated
       via  cd09d4f470f third_party: Update nss_wraper to version 1.1.12
      from  80ba66013ef ctdb-scripts: Drop use of eval in CTDB callout handling

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


- Log -----------------------------------------------------------------
commit cd09d4f470f9b910a426e9bbc1931b68d78e1bd6
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Jun 24 10:39:57 2022 +0200

    third_party: Update nss_wraper to version 1.1.12
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Jun 24 22:29:33 UTC 2022 on sn-devel-184

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

Summary of changes:
 buildtools/wafsamba/samba_third_party.py |  2 +-
 third_party/nss_wrapper/nss_wrapper.c    | 31 ++++++++++++++++++++++++++++---
 third_party/nss_wrapper/wscript          |  2 +-
 3 files changed, 30 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 f046ebc96da..1868e7ba51b 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.11')
+    return conf.CHECK_BUNDLED_SYSTEM_PKG('nss_wrapper', minversion='1.1.12')
 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 17c87321d4d..88e81d9c652 100644
--- a/third_party/nss_wrapper/nss_wrapper.c
+++ b/third_party/nss_wrapper/nss_wrapper.c
@@ -1070,7 +1070,14 @@ static struct nwrap_he nwrap_he_global;
 
 static bool nwrap_gr_parse_line(struct nwrap_cache *nwrap, char *line);
 static void nwrap_gr_unload(struct nwrap_cache *nwrap);
+#if ! defined(HAVE_CONSTRUCTOR_ATTRIBUTE) && defined(HAVE_PRAGMA_INIT)
+/* xlC and other oldschool compilers support (only) this */
+#pragma init (nwrap_constructor)
+#endif
 void nwrap_constructor(void) CONSTRUCTOR_ATTRIBUTE;
+#if ! defined(HAVE_DESTRUCTOR_ATTRIBUTE) && defined(HAVE_PRAGMA_FINI)
+#pragma fini (nwrap_destructor)
+#endif
 void nwrap_destructor(void) DESTRUCTOR_ATTRIBUTE;
 
 /*********************************************************
@@ -2129,7 +2136,21 @@ reopen:
 	}
 
 	ret = fstat(nwrap->fd, &st);
-	if (ret != 0) {
+	if (ret != 0 && errno == EBADF && retried == false) {
+		/* maybe something closed the fd on our behalf */
+		NWRAP_LOG(NWRAP_LOG_TRACE,
+			  "fstat(%s) - %d:%s - reopen",
+			  nwrap->path,
+			  ret,
+			  strerror(errno));
+		retried = true;
+		memset(&nwrap->st, 0, sizeof(nwrap->st));
+		fclose(nwrap->fp);
+		nwrap->fp = NULL;
+		nwrap->fd = -1;
+		goto reopen;
+	}
+	else if (ret != 0) {
 		NWRAP_LOG(NWRAP_LOG_ERROR,
 			  "fstat(%s) - %d:%s",
 			  nwrap->path,
@@ -4070,6 +4091,10 @@ static int nwrap_files_getaddrinfo(const char *name,
 	}
 
 	name_len = strlen(name);
+	if (name_len == 0) {
+		return EAI_NONAME;
+	}
+
 	if (name_len < sizeof(canon_name) && name[name_len - 1] == '.') {
 		memcpy(canon_name, name, name_len - 1);
 		canon_name[name_len] = '\0';
@@ -4462,7 +4487,7 @@ static int nwrap_module_getpwent_r(struct nwrap_backend *b,
 
 static void nwrap_module_endpwent(struct nwrap_backend *b)
 {
-	if (b->symbols->_nss_endpwent.f) {
+	if (b->symbols->_nss_endpwent.f == NULL) {
 		return;
 	}
 
@@ -4634,7 +4659,7 @@ static int nwrap_module_getgrgid_r(struct nwrap_backend *b,
 
 static void nwrap_module_setgrent(struct nwrap_backend *b)
 {
-	if (b->symbols->_nss_setgrent.f) {
+	if (b->symbols->_nss_setgrent.f == NULL) {
 		return;
 	}
 
diff --git a/third_party/nss_wrapper/wscript b/third_party/nss_wrapper/wscript
index 0728d4fee7c..c9f0b9a1edd 100644
--- a/third_party/nss_wrapper/wscript
+++ b/third_party/nss_wrapper/wscript
@@ -2,7 +2,7 @@
 
 import os
 
-VERSION="1.1.11"
+VERSION="1.1.12"
 
 def configure(conf):
     if conf.CHECK_NSS_WRAPPER():


-- 
Samba Shared Repository



More information about the samba-cvs mailing list