aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch
blob: fb12a10e26d2162b69a11bd879c5a4af02ef6337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From fcb8ecd530b2d151e373974741601483326f7528 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 27 Jun 2019 11:09:47 +0800
Subject: [PATCH] samba: fix musl lib without innetgr

Upstream-Status: Pending

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 lib/util/access.c | 2 +-
 source3/auth/user_util.c | 2 +-
 2 file changed, 2 insertion(+), 2 deletion(-)

diff --git a/lib/util/access.c b/lib/util/access.c
index 7da0573..b94949e 100644
--- a/lib/util/access.c
+++ b/lib/util/access.c
@@ -112,7 +112,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/source3/auth/user_util.c b/source3/auth/user_util.c
index a76b5d4..30f523d 100644
--- a/source3/auth/user_util.c
+++ b/source3/auth/user_util.c
@@ -148,7 +148,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)
 	static char *my_yp_domain = NULL;
 	char *lowercase_user = NULL;
 
-- 
2.7.4