[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Mon Aug 8 07:29:01 UTC 2022


The branch, master has been updated
       via  fb937ddc838 lib/util/access: source3/auth/user_util: Check for INNETGR
       via  e13875601ff nsswitch/wins: Define NETDB_* for other libc's
      from  7cd87156761 vfs: Add struct vfs_open_how.resolve

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


- Log -----------------------------------------------------------------
commit fb937ddc838043deb82b6a557dce8f29001d0a19
Author: listout <brahmajit.xyz at gmail.com>
Date:   Thu Jul 14 18:51:09 2022 +0530

    lib/util/access: source3/auth/user_util: Check for INNETGR
    
    Checking for presence of both netgroup and innetgr. INNETGR is not
    defined on libc's such as musl so not checking results in a build error.
    
    Signed-off-by: listout <brahmajit.xyz at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Mon Aug  8 07:28:31 UTC 2022 on sn-devel-184

commit e13875601ff6f488b48e7de0f6838db3565401d4
Author: listout <brahmajit.xyz at gmail.com>
Date:   Thu Jul 14 18:45:17 2022 +0530

    nsswitch/wins: Define NETDB_* for other libc's
    
    Define NETDB_SUCCESS and NETDB_INTERNAL if they are not defined. On
    libc's such as musl NETDB_INTERNAL and NETDB_SUCCESS are not defined.
    
    Signed-off-by: listout <brahmajit.xyz at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

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

Summary of changes:
 lib/util/access.c        | 2 +-
 nsswitch/wins.c          | 8 ++++++++
 source3/auth/user_util.c | 4 ++--
 3 files changed, 11 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/access.c b/lib/util/access.c
index b1b4bffaeaa..f4b5ae79125 100644
--- a/lib/util/access.c
+++ b/lib/util/access.c
@@ -115,7 +115,7 @@ static bool string_match(const char *tok,const char *s)
 			return true;
 		}
 	} else if (tok[0] == '@') { /* netgroup: look it up */
-#ifdef HAVE_NETGROUP
+#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR)
 		DATA_BLOB tmp;
 		char *mydomain = NULL;
 		char *hostname = NULL;
diff --git a/nsswitch/wins.c b/nsswitch/wins.c
index e202a45e26e..a310477cfad 100644
--- a/nsswitch/wins.c
+++ b/nsswitch/wins.c
@@ -40,6 +40,14 @@ static pthread_mutex_t wins_nss_mutex = PTHREAD_MUTEX_INITIALIZER;
 #define INADDRSZ 4
 #endif
 
+#ifndef NETDB_INTERNAL
+#define NETDB_INTERNAL -1
+#endif
+
+#ifndef NETDB_SUCCESS
+#define NETDB_SUCCESS 0
+#endif
+
 _PUBLIC_ON_LINUX_
 NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
 				     struct hostent *he,
diff --git a/source3/auth/user_util.c b/source3/auth/user_util.c
index 805f3ada231..cd97d62af4b 100644
--- a/source3/auth/user_util.c
+++ b/source3/auth/user_util.c
@@ -135,7 +135,7 @@ static void store_map_in_gencache(TALLOC_CTX *ctx, const char *from, const char
 
 bool user_in_netgroup(TALLOC_CTX *ctx, const char *user, const char *ngname)
 {
-#ifdef HAVE_NETGROUP
+#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR)
 	char nis_domain_buf[256];
 	const char *nis_domain = NULL;
 	char *lowercase_user = NULL;
@@ -183,7 +183,7 @@ bool user_in_netgroup(TALLOC_CTX *ctx, const char *user, const char *ngname)
 		TALLOC_FREE(lowercase_user);
 		return true;
 	}
-#endif /* HAVE_NETGROUP */
+#endif /* HAVE_NETGROUP and HAVE_INNETGR */
 	return false;
 }
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list