summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/libnss-nis/libnss-nis.bb5
-rw-r--r--meta/recipes-extended/libnss-nis/libnss-nis/0001-nis-hosts-Remove-use-of-RES_USE_INET6.patch162
2 files changed, 2 insertions, 165 deletions
diff --git a/meta/recipes-extended/libnss-nis/libnss-nis.bb b/meta/recipes-extended/libnss-nis/libnss-nis.bb
index 4fbd4b1f6a..a1d914e871 100644
--- a/meta/recipes-extended/libnss-nis/libnss-nis.bb
+++ b/meta/recipes-extended/libnss-nis/libnss-nis.bb
@@ -13,12 +13,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
13SECTION = "libs" 13SECTION = "libs"
14DEPENDS += "libtirpc libnsl2" 14DEPENDS += "libtirpc libnsl2"
15 15
16PV = "3.0+git${SRCPV}" 16PV = "3.1+git${SRCPV}"
17 17
18SRCREV = "d4aea48657a8e90d7922574b8021ee03915a36cb" 18SRCREV = "062f31999b35393abf7595cb89dfc9590d5a42ad"
19 19
20SRC_URI = "git://github.com/thkukuk/libnss_nis \ 20SRC_URI = "git://github.com/thkukuk/libnss_nis \
21 file://0001-nis-hosts-Remove-use-of-RES_USE_INET6.patch \
22 " 21 "
23 22
24S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"
diff --git a/meta/recipes-extended/libnss-nis/libnss-nis/0001-nis-hosts-Remove-use-of-RES_USE_INET6.patch b/meta/recipes-extended/libnss-nis/libnss-nis/0001-nis-hosts-Remove-use-of-RES_USE_INET6.patch
deleted file mode 100644
index 348c8c94b6..0000000000
--- a/meta/recipes-extended/libnss-nis/libnss-nis/0001-nis-hosts-Remove-use-of-RES_USE_INET6.patch
+++ /dev/null
@@ -1,162 +0,0 @@
1From e41ddbd89a4bb042ac00469fa5880ba584c25c05 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 25 Jul 2019 12:10:56 -0700
4Subject: [PATCH] nis-hosts: Remove use of RES_USE_INET6
5
6Upstream glibc dropped it starting glibc 2.30
7see
8https://sourceware.org/git/?p=glibc.git;a=commit;h=3f8b44be0a658266adff5ece1e4bc3ce097a5dbe
9
10Fixes issue #6
11
12Upstream-Status: Submitted [https://github.com/thkukuk/libnss_nis/pull/7]
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 src/nis-hosts.c | 55 ++++++++++++-------------------------------------
17 1 file changed, 13 insertions(+), 42 deletions(-)
18
19diff --git a/src/nis-hosts.c b/src/nis-hosts.c
20index 307b46e..bd3c4ad 100644
21--- a/src/nis-hosts.c
22+++ b/src/nis-hosts.c
23@@ -35,15 +35,12 @@
24 #include "libc-lock.h"
25 #include "nss-nis.h"
26
27-/* Get implementation for some internal functions. */
28-#include "mapv4v6addr.h"
29-
30 #define ENTNAME hostent
31 #define DATABASE "hosts"
32 #define NEED_H_ERRNO
33
34-#define EXTRA_ARGS , af, flags
35-#define EXTRA_ARGS_DECL , int af, int flags
36+#define EXTRA_ARGS , af
37+#define EXTRA_ARGS_DECL , int af
38
39 #define ENTDATA hostent_data
40 struct hostent_data
41@@ -67,19 +64,8 @@ LINE_PARSER
42 /* Parse address. */
43 if (af != AF_INET6 && inet_pton (AF_INET, addr, entdata->host_addr) > 0)
44 {
45- assert ((flags & AI_V4MAPPED) == 0 || af != AF_UNSPEC);
46- if (flags & AI_V4MAPPED)
47- {
48- map_v4v6_address ((char *) entdata->host_addr,
49- (char *) entdata->host_addr);
50- result->h_addrtype = AF_INET6;
51- result->h_length = IN6ADDRSZ;
52- }
53- else
54- {
55- result->h_addrtype = AF_INET;
56- result->h_length = INADDRSZ;
57- }
58+ result->h_addrtype = AF_INET;
59+ result->h_length = INADDRSZ;
60 }
61 else if (af != AF_INET
62 && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
63@@ -134,7 +120,7 @@ strong_alias (_nss_nis_sethostent, _nss_nis_endhostent)
64 static enum nss_status
65 internal_nis_gethostent_r (struct hostent *host, char *buffer,
66 size_t buflen, int *errnop, int *h_errnop,
67- int af, int flags)
68+ int af)
69 {
70 char *domain;
71 if (yp_get_default_domain (&domain))
72@@ -203,7 +189,7 @@ internal_nis_gethostent_r (struct hostent *host, char *buffer,
73 ++p;
74 free (result);
75
76- parse_res = parse_line (p, host, data, buflen, errnop, af, flags);
77+ parse_res = parse_line (p, host, data, buflen, errnop, af);
78 if (parse_res == -1)
79 {
80 free (outkey);
81@@ -232,8 +218,7 @@ _nss_nis_gethostent_r (struct hostent *host, char *buffer, size_t buflen,
82 __libc_lock_lock (lock);
83
84 status = internal_nis_gethostent_r (host, buffer, buflen, errnop, h_errnop,
85- ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET),
86- ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0 ));
87+ AF_INET);
88
89 __libc_lock_unlock (lock);
90
91@@ -244,7 +229,7 @@ _nss_nis_gethostent_r (struct hostent *host, char *buffer, size_t buflen,
92 static enum nss_status
93 internal_gethostbyname2_r (const char *name, int af, struct hostent *host,
94 char *buffer, size_t buflen, int *errnop,
95- int *h_errnop, int flags)
96+ int *h_errnop)
97 {
98 uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct parser_data);
99 buffer += pad;
100@@ -318,7 +303,7 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host,
101 ++p;
102 free (result);
103
104- int parse_res = parse_line (p, host, data, buflen, errnop, af, flags);
105+ int parse_res = parse_line (p, host, data, buflen, errnop, af);
106
107 if (parse_res < 1 || host->h_addrtype != af)
108 {
109@@ -351,8 +336,7 @@ _nss_nis_gethostbyname2_r (const char *name, int af, struct hostent *host,
110 }
111
112 return internal_gethostbyname2_r (name, af, host, buffer, buflen, errnop,
113- h_errnop,
114- ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
115+ h_errnop);
116 }
117
118
119@@ -360,18 +344,8 @@ enum nss_status
120 _nss_nis_gethostbyname_r (const char *name, struct hostent *host, char *buffer,
121 size_t buflen, int *errnop, int *h_errnop)
122 {
123- if (_res.options & RES_USE_INET6)
124- {
125- enum nss_status status;
126-
127- status = internal_gethostbyname2_r (name, AF_INET6, host, buffer, buflen,
128- errnop, h_errnop, AI_V4MAPPED);
129- if (status == NSS_STATUS_SUCCESS)
130- return status;
131- }
132-
133 return internal_gethostbyname2_r (name, AF_INET, host, buffer, buflen,
134- errnop, h_errnop, 0);
135+ errnop, h_errnop);
136 }
137
138
139@@ -433,9 +407,7 @@ _nss_nis_gethostbyaddr_r (const void *addr, socklen_t addrlen, int af,
140 ++p;
141 free (result);
142
143- int parse_res = parse_line (p, host, data, buflen, errnop, af,
144- ((_res.options & RES_USE_INET6)
145- ? AI_V4MAPPED : 0));
146+ int parse_res = parse_line (p, host, data, buflen, errnop, af);
147 if (parse_res < 1)
148 {
149 if (parse_res == -1)
150@@ -532,8 +504,7 @@ _nss_nis_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
151 buflen -= pad;
152
153 struct hostent host;
154- int parse_res = parse_line (result, &host, data, buflen, errnop, AF_UNSPEC,
155- 0);
156+ int parse_res = parse_line (result, &host, data, buflen, errnop, AF_UNSPEC);
157 if (parse_res < 1)
158 {
159 if (parse_res == -1)
160--
1612.22.0
162