aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2023-03-08 15:17:51 +1000
committerfuzzard <fuzzard@kodi.tv>2023-03-08 19:17:27 +1000
commit41ad40e1d018f01688c2184bdd1b1096f89709eb (patch)
tree58dfc9f14d426e2356007dc28a139876bac12249 /tools
parenta04535ef9f607f81e48671ef89ff80949e68667c (diff)
[tools/depends][target] samba patch innetgr check
This patch is in newer versions of samba. Fixes android failures with SDK 33 and newer build tools ld: error: undefined symbol: innetgr >>> referenced by access.c:157 (../../lib/util/access.c:157) >>> access.c.65.o:(string_match) in archive /Users/Shared/xbmc-depends/aarch64-linux-android-33-debug/lib/libsmbclient.a clang++: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [libkodi.so] Error 1 make[2]: *** [CMakeFiles/kodi.dir/all] Error 2 make[1]: *** [CMakeFiles/apk.dir/rule] Error 2
Diffstat (limited to 'tools')
-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