aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfuzzard <fuzzard@users.noreply.github.com>2023-03-09 10:44:26 +1000
committerGitHub <noreply@github.com>2023-03-09 10:44:26 +1000
commite1793d445430feef562b7d4dc0a5e28dbf2a50d8 (patch)
tree2153c1e0a6364dc8a543752fb17f39bd33fee7c2
parent8a93cf4e31e58c1731a4b5cdb03a4678b872f405 (diff)
parent41ad40e1d018f01688c2184bdd1b1096f89709eb (diff)
Merge pull request #22938 from fuzzard/fix_androidsamba
[tools/depends][target] samba patch innetgr check
-rw-r--r--tools/depends/target/samba-gplv3/07-innetgr-check.patch31
-rw-r--r--tools/depends/target/samba-gplv3/Makefile1
2 files changed, 32 insertions, 0 deletions
diff --git a/tools/depends/target/samba-gplv3/07-innetgr-check.patch b/tools/depends/target/samba-gplv3/07-innetgr-check.patch
new file mode 100644
index 0000000000..7fb89ae6ed
--- /dev/null
+++ b/tools/depends/target/samba-gplv3/07-innetgr-check.patch
@@ -0,0 +1,31 @@
+--- 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 @@
+
+ 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;
+@@ -180,7 +180,7 @@
+ DEBUG(5,("user_in_netgroup: Found\n"));
+ return true;
+ }
+-#endif /* HAVE_NETGROUP */
++#endif /* HAVE_NETGROUP and HAVE_INNETGR */
+ return false;
+ }
+
diff --git a/tools/depends/target/samba-gplv3/Makefile b/tools/depends/target/samba-gplv3/Makefile
index 66604c0f35..b352935a5a 100644
--- a/tools/depends/target/samba-gplv3/Makefile
+++ b/tools/depends/target/samba-gplv3/Makefile
@@ -73,6 +73,7 @@ $(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)
cd $(PLATFORM); patch -p1 -i ../04-built-static.patch
ifeq ($(OS),android)
cd $(PLATFORM); patch -p1 -i ../samba_android.patch
+ cd $(PLATFORM); patch -p1 -i ../07-innetgr-check.patch
endif
ifeq ($(OS), darwin_embedded)
cd $(PLATFORM); patch -p1 -i ../no_fork_and_exec.patch