|
@@ -0,0 +1,34 @@
|
|
|
|
+# Gentoo bug 855047
|
|
|
|
+
|
|
|
|
+Fixes uClibc build when uClibc was build without netgroup support.
|
|
|
|
+Upstream enables netgroup support based on getdomainname() being
|
|
|
|
+present:
|
|
|
|
+https://github.com/samba-team/samba/commit/f179184a2be2ddd38f463fcc12252f8d24e529f8#diff-b8d1bc25b89846e70ecb61cb296a8f5c50c9a0a1b62e46790fae81aa9d5bfaaeR632
|
|
|
|
+
|
|
|
|
+Downloaded from
|
|
|
|
+https://gitweb.gentoo.org/repo/gentoo.git/tree/net-fs/samba/files/samba-4.16.2-fix-musl-without-innetgr.patch
|
|
|
|
+
|
|
|
|
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
|
|
+
|
|
|
|
+--- 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;
|
|
|
|
+--- 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;
|