summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorbrahmajit das <brahmajit.xyz@gmail.com>2022-06-30 00:06:50 +0530
committerSam James <sam@gentoo.org>2022-07-18 00:26:11 +0000
commitd68dbb343ba94e145423987a1d5d8e1869e27736 (patch)
tree56eaf1503781c3559c6b38e145570577f8f30284 /net-fs
parentdev-util/sysdig-kmod: fix kmod build on kernels >= 5.18 (diff)
downloadgentoo-d68dbb343ba94e145423987a1d5d8e1869e27736.tar.gz
gentoo-d68dbb343ba94e145423987a1d5d8e1869e27736.tar.bz2
gentoo-d68dbb343ba94e145423987a1d5d8e1869e27736.zip
net-fs/samba: Fix undefined innetgr on musl
Currently samba fails to build on musl with error message saying undefined reference to `innetgr'. This patch fixes that issue. Closes: https://bugs.gentoo.org/855047 Signed-off-by: brahmajit das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/26151 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/samba/files/samba-4.16.2-fix-musl-without-innetgr.patch23
-rw-r--r--net-fs/samba/samba-4.16.2.ebuild1
2 files changed, 24 insertions, 0 deletions
diff --git a/net-fs/samba/files/samba-4.16.2-fix-musl-without-innetgr.patch b/net-fs/samba/files/samba-4.16.2-fix-musl-without-innetgr.patch
new file mode 100644
index 000000000000..c0b1746fc31a
--- /dev/null
+++ b/net-fs/samba/files/samba-4.16.2-fix-musl-without-innetgr.patch
@@ -0,0 +1,23 @@
+# Gentoo bug 855047
+--- 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;
diff --git a/net-fs/samba/samba-4.16.2.ebuild b/net-fs/samba/samba-4.16.2.ebuild
index 090a59c32be1..e5115c4e9c41 100644
--- a/net-fs/samba/samba-4.16.2.ebuild
+++ b/net-fs/samba/samba-4.16.2.ebuild
@@ -142,6 +142,7 @@ BDEPEND="${PYTHON_DEPS}
PATCHES=(
"${FILESDIR}/${PN}-4.4.0-pam.patch"
"${FILESDIR}/${PN}-4.16.1-netdb-defines.patch"
+ "${FILESDIR}/${PN}-4.16.2-fix-musl-without-innetgr.patch"
)
#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"