1 |
commit: 315197cca233450f741cbe915402c2479cd5229a |
2 |
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at> |
3 |
AuthorDate: Sun Sep 5 18:27:17 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 8 03:10:09 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=315197cc |
7 |
|
8 |
sys-auth/nss_ldap: remove unused patches |
9 |
|
10 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
11 |
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/22227 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
sys-auth/nss_ldap/files/nss_ldap-265-fbsd.patch | 432 --------------------- |
16 |
.../nss_ldap/files/nss_ldap-265-installdir.patch | 35 -- |
17 |
sys-auth/nss_ldap/files/nss_ldap-265-libdir.patch | 31 -- |
18 |
3 files changed, 498 deletions(-) |
19 |
|
20 |
diff --git a/sys-auth/nss_ldap/files/nss_ldap-265-fbsd.patch b/sys-auth/nss_ldap/files/nss_ldap-265-fbsd.patch |
21 |
deleted file mode 100644 |
22 |
index 1ae1171f88e..00000000000 |
23 |
--- a/sys-auth/nss_ldap/files/nss_ldap-265-fbsd.patch |
24 |
+++ /dev/null |
25 |
@@ -1,432 +0,0 @@ |
26 |
---- Makefile.am.orig 2009-11-06 05:28:08.000000000 -0500 |
27 |
-+++ Makefile.am 2010-01-12 23:24:17.000000000 -0500 |
28 |
-@@ -9,8 +9,12 @@ |
29 |
- if AIX |
30 |
- INST_GID=system |
31 |
- else |
32 |
-+if FreeBSD |
33 |
-+INST_GID=wheel |
34 |
-+else |
35 |
- INST_GID=root |
36 |
- endif |
37 |
-+endif |
38 |
- |
39 |
- EXTRA_DIST = CVSVersionInfo.txt ChangeLog \ |
40 |
- AUTHORS ANNOUNCE NEWS INSTALL README LICENSE.OpenLDAP COPYING\ |
41 |
-@@ -23,7 +27,7 @@ |
42 |
- ldap-alias.c ldap-service.c ldap-schema.c ldap-ethers.c \ |
43 |
- ldap-bp.c ldap-automount.c util.c ltf.c snprintf.c resolve.c \ |
44 |
- dnsconfig.c irs-nss.c pagectrl.c ldap-sldap.c ldap-init-krb5-cache.c \ |
45 |
-- vers.c |
46 |
-+ vers.c bsdnss.c |
47 |
- |
48 |
- nss_ldap_so_LDFLAGS = @nss_ldap_so_LDFLAGS@ |
49 |
- |
50 |
-@@ -103,11 +107,10 @@ |
51 |
- $(mkinstalldirs) $(DESTDIR)$(dir $(NSS_LDAP_PATH_CONF)); \ |
52 |
- $(INSTALL_DATA) -o $(INST_UID) -g $(INST_GID) $(srcdir)/ldap.conf $(DESTDIR)$(NSS_LDAP_PATH_CONF); \ |
53 |
- fi |
54 |
-- $(INSTALL_DATA) -o $(INST_UID) -g $(INST_GID) $(srcdir)/nsswitch.ldap $(DESTDIR)$(sysconfdir)/nsswitch.ldap; |
55 |
- |
56 |
- uninstall-local: |
57 |
- @$(NORMAL_UNINSTALL) |
58 |
- |
59 |
- vers.c: $(top_srcdir)/CVSVersionInfo.txt |
60 |
-- CVSVERSIONDIR=$(top_srcdir) ./vers_string -v |
61 |
-+ $(top_srcdir)/vers_string -v |
62 |
- |
63 |
- |
64 |
---- configure.in.orig 2007-10-29 06:30:12.000000000 -0700 |
65 |
-+++ configure.in 2008-09-26 20:38:20.000000000 -0700 |
66 |
-@@ -97,11 +97,15 @@ |
67 |
- linux*) nss_ldap_so_LDFLAGS="-shared -Wl,-Bdynamic -Wl,--version-script,\$(srcdir)/exports.linux" ;; |
68 |
- *) nss_ldap_so_LDFLAGS="-shared -Wl,-Bdynamic" ;; |
69 |
- esac |
70 |
-+case "$target_os" in |
71 |
-+freebsd*) TARGET_OS=FreeBSD ;; |
72 |
-+esac |
73 |
- |
74 |
- AM_CONDITIONAL(GCC, test "$GCC" = "yes") |
75 |
- AM_CONDITIONAL(GLIBC, test "$target_os" = "linux" -o "$target_os" = "linux-gnu") |
76 |
- AM_CONDITIONAL(AIX, test "$TARGET_OS" = AIX) |
77 |
- AM_CONDITIONAL(HPUX, test "$TARGET_OS" = HPUX) |
78 |
-+AM_CONDITIONAL(FreeBSD, test "$TARGET_OS" = FreeBSD) |
79 |
- |
80 |
- AM_CONDITIONAL(USE_NATIVE_LINKER, test -n "$nss_ldap_so_LD") |
81 |
- |
82 |
-@@ -153,7 +157,6 @@ |
83 |
- aix*) AC_CHECK_HEADERS(irs.h usersec.h) ;; |
84 |
- hpux*) AC_CHECK_HEADERS(nsswitch.h) ;; |
85 |
- *) AC_CHECK_HEADERS(nss.h) |
86 |
-- AC_CHECK_HEADERS(nsswitch.h) |
87 |
- AC_CHECK_HEADERS(irs.h) ;; |
88 |
- esac |
89 |
- AC_CHECK_HEADERS(thread.h) |
90 |
-@@ -232,7 +235,6 @@ |
91 |
- AC_CHECK_FUNCS(gethostbyname) |
92 |
- AC_CHECK_FUNCS(nsdispatch) |
93 |
- AC_CHECK_LIB(pthread_nonshared, main) |
94 |
--AC_CHECK_FUNCS(pthread_atfork) |
95 |
- AC_CHECK_FUNCS(pthread_once) |
96 |
- AC_CHECK_FUNCS(ether_aton) |
97 |
- AC_CHECK_FUNCS(ether_ntoa) |
98 |
- |
99 |
---- ldap-ethers.c.orig 2009-11-06 10:28:08.000000000 +0000 |
100 |
-+++ ldap-ethers.c 2009-12-23 17:01:14.000000000 +0000 |
101 |
-@@ -217,9 +217,9 @@ |
102 |
- } |
103 |
- |
104 |
- snprintf(fullmac, sizeof(fullmac), "%02x:%02x:%02x:%02x:%02x:%02x", |
105 |
-- addr->ether_addr_octet[0], addr->ether_addr_octet[1], |
106 |
-- addr->ether_addr_octet[2], addr->ether_addr_octet[3], |
107 |
-- addr->ether_addr_octet[4], addr->ether_addr_octet[5]); |
108 |
-+ addr->octet[0], addr->octet[1], |
109 |
-+ addr->octet[2], addr->octet[3], |
110 |
-+ addr->octet[4], addr->octet[5]); |
111 |
- |
112 |
- LA_INIT(a); |
113 |
- LA_STRING(a) = ether_ntoa(addr); |
114 |
-@@ -343,14 +343,14 @@ |
115 |
- if (i != 6) |
116 |
- return NULL; |
117 |
- for (i = 0; i < 6; i++) |
118 |
-- ep.ether_addr_octet[i] = t[i]; |
119 |
-+ ep.octet[i] = t[i]; |
120 |
- |
121 |
- return &ep; |
122 |
- } |
123 |
- #endif /* !HAVE_ETHER_ATON */ |
124 |
- |
125 |
- #ifndef HAVE_ETHER_NTOA |
126 |
--#define EI(i) (unsigned int)(e->ether_addr_octet[(i)]) |
127 |
-+#define EI(i) (unsigned int)(e->octet[(i)]) |
128 |
- static char *ether_ntoa (const struct ether_addr *e) |
129 |
- { |
130 |
- static char s[18]; |
131 |
- |
132 |
---- ldap-ethers.h.orig 2009-11-06 10:28:08.000000000 +0000 |
133 |
-+++ ldap-ethers.h 2009-12-23 17:02:06.000000000 +0000 |
134 |
-@@ -32,7 +32,7 @@ |
135 |
- |
136 |
- #ifndef HAVE_STRUCT_ETHER_ADDR |
137 |
- struct ether_addr { |
138 |
-- u_char ether_addr_octet[6]; |
139 |
-+ u_char octet[6]; |
140 |
- }; |
141 |
- #endif |
142 |
- |
143 |
---- ldap-nss.c.orig Sat May 27 16:23:40 2006 |
144 |
-+++ ldap-nss.c Sat May 27 16:23:52 2006 |
145 |
-@@ -69,7 +69,7 @@ |
146 |
- #endif |
147 |
- |
148 |
- /* Try to handle systems with both SASL libraries installed */ |
149 |
--#if defined(HAVE_SASL_SASL_H) && defined(HAVE_SASL_AUXPROP_REQUEST) |
150 |
-+#if defined(HAVE_SASL_SASL_H) |
151 |
- #include <sasl/sasl.h> |
152 |
- #elif defined(HAVE_SASL_H) |
153 |
- #include <sasl.h> |
154 |
- |
155 |
---- ldap-pwd.c.orig 2008-10-30 21:50:15.000000000 +0100 |
156 |
-+++ ldap-pwd.c 2008-12-06 00:37:30.216966282 +0100 |
157 |
-@@ -21,7 +21,10 @@ |
158 |
- static char rcsId[] = |
159 |
- "$Id$"; |
160 |
- |
161 |
-+#include <sys/types.h> |
162 |
-+#include <unistd.h> |
163 |
- #include "config.h" |
164 |
-+ |
165 |
- |
166 |
- #ifdef HAVE_PORT_BEFORE_H |
167 |
- #include <port_before.h> |
168 |
-@@ -90,9 +93,13 @@ |
169 |
- size_t tmplen; |
170 |
- char *tmp; |
171 |
- |
172 |
-- if (_nss_ldap_oc_check (e, "shadowAccount") == NSS_SUCCESS) |
173 |
-- { |
174 |
-+/* if (_nss_ldap_oc_check (e, "shadowAccount") == NSS_SUCCESS) |
175 |
-+ * { |
176 |
-+ */ |
177 |
- /* don't include password for shadowAccount */ |
178 |
-+ if (geteuid() != 0) |
179 |
-+ { |
180 |
-+ /* don't include password for non-root users */ |
181 |
- if (buflen < 3) |
182 |
- return NSS_TRYAGAIN; |
183 |
- |
184 |
-@@ -163,6 +170,15 @@ |
185 |
- } |
186 |
-+ |
187 |
-+#ifdef HAVE_LOGIN_CLASSES |
188 |
-+ stat = |
189 |
-+ _nss_ldap_assign_attrval (e, AT (loginClass), &pw->pw_class, &buffer, |
190 |
-+ &buflen); |
191 |
-+ if (stat != NSS_SUCCESS) |
192 |
-+ (void) _nss_ldap_assign_emptystring (&pw->pw_class, &buffer, &buflen); |
193 |
-+#endif |
194 |
-+ |
195 |
- |
196 |
- stat = |
197 |
- _nss_ldap_assign_attrval (e, AT (homeDirectory), &pw->pw_dir, &buffer, |
198 |
- &buflen); |
199 |
- if (stat != NSS_SUCCESS) |
200 |
- |
201 |
---- ldap-schema.c 2009-08-29 09:21:43.000000000 -0400 |
202 |
-+++ ldap-schema.c 2009-08-28 12:09:52.000000000 -0400 |
203 |
-@@ -334,6 +334,9 @@ |
204 |
- #ifdef HAVE_PASSWD_PW_EXPIRE |
205 |
- (*pwd_attrs)[i++] = AT (shadowExpire); |
206 |
- #endif /* HAVE_PASSWD_PW_EXPIRE */ |
207 |
-+#ifdef HAVE_LOGIN_CLASSES |
208 |
-+ (*pwd_attrs)[i++] = AT (loginClass); |
209 |
-+#endif |
210 |
- (*pwd_attrs)[i] = NULL; |
211 |
- } |
212 |
- |
213 |
---- ldap-schema.h 2009-08-29 09:21:43.000000000 -0400 |
214 |
-+++ ldap-schema.h 2009-08-29 06:37:18.000000000 -0400 |
215 |
-@@ -24,7 +24,7 @@ |
216 |
- #define _LDAP_NSS_LDAP_LDAP_SCHEMA_H |
217 |
- |
218 |
- /* max number of attributes per object class */ |
219 |
--#define ATTRTAB_SIZE 15 |
220 |
-+#define ATTRTAB_SIZE 16 |
221 |
- |
222 |
- /** |
223 |
- * function to initialize global lookup filters. |
224 |
-@@ -153,6 +153,10 @@ |
225 |
- #define AT_gecos "gecos" |
226 |
- #define AT_homeDirectory "homeDirectory" |
227 |
- |
228 |
-+#ifdef HAVE_LOGIN_CLASSES |
229 |
-+/* FreeBSD extension -Jacob Myers <jacob@××××××××××.org> */ |
230 |
-+#define AT_loginClass "loginClass" |
231 |
-+#endif |
232 |
- /* |
233 |
- * ( nisSchema.2.1 NAME 'shadowAccount' SUP top AUXILIARY |
234 |
- * DESC 'Additional attributes for shadow passwords' |
235 |
- |
236 |
---- /dev/null 2013-04-13 01:27:01.290932001 +0200 |
237 |
-+++ bsdnss.c 2013-04-14 03:17:47.794195349 +0200 |
238 |
-@@ -0,0 +1,219 @@ |
239 |
-+#include <errno.h> |
240 |
-+#include <stdlib.h> |
241 |
-+#include <sys/param.h> |
242 |
-+#include <netinet/in.h> |
243 |
-+#include <pwd.h> |
244 |
-+#include <grp.h> |
245 |
-+#include <nss.h> |
246 |
-+#include <nsswitch.h> |
247 |
-+#include <netdb.h> |
248 |
-+ |
249 |
-+extern enum nss_status _nss_ldap_getgrent_r(struct group *, char *, size_t, |
250 |
-+ int *); |
251 |
-+extern enum nss_status _nss_ldap_getgrnam_r(const char *, struct group *, |
252 |
-+ char *, size_t, int *); |
253 |
-+extern enum nss_status _nss_ldap_getgrgid_r(gid_t gid, struct group *, char *, |
254 |
-+ size_t, int *); |
255 |
-+extern enum nss_status _nss_ldap_setgrent(void); |
256 |
-+extern enum nss_status _nss_ldap_endgrent(void); |
257 |
-+extern enum nss_status _nss_ldap_initgroups_dyn(const char *, gid_t, long int *, |
258 |
-+ long int *, gid_t **, long int, int *); |
259 |
-+ |
260 |
-+extern enum nss_status _nss_ldap_getpwent_r(struct passwd *, char *, size_t, |
261 |
-+ int *); |
262 |
-+extern enum nss_status _nss_ldap_getpwnam_r(const char *, struct passwd *, |
263 |
-+ char *, size_t, int *); |
264 |
-+extern enum nss_status _nss_ldap_getpwuid_r(gid_t gid, struct passwd *, char *, |
265 |
-+ size_t, int *); |
266 |
-+extern enum nss_status _nss_ldap_setpwent(void); |
267 |
-+extern enum nss_status _nss_ldap_endpwent(void); |
268 |
-+ |
269 |
-+extern enum nss_status _nss_ldap_gethostbyname_r (const char *name, struct hostent * result, |
270 |
-+ char *buffer, size_t buflen, int *errnop, |
271 |
-+ int *h_errnop); |
272 |
-+ |
273 |
-+extern enum nss_status _nss_ldap_gethostbyname2_r (const char *name, int af, struct hostent * result, |
274 |
-+ char *buffer, size_t buflen, int *errnop, |
275 |
-+ int *h_errnop); |
276 |
-+extern enum nss_status _nss_ldap_gethostbyaddr_r (struct in_addr * addr, int len, int type, |
277 |
-+ struct hostent * result, char *buffer, |
278 |
-+ size_t buflen, int *errnop, int *h_errnop); |
279 |
-+ |
280 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_getgrnam_r); |
281 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_getgrgid_r); |
282 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_getgrent_r); |
283 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_setgrent); |
284 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_endgrent); |
285 |
-+static NSS_METHOD_PROTOTYPE(__freebsd_getgroupmembership); |
286 |
-+ |
287 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_getpwnam_r); |
288 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_getpwuid_r); |
289 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_getpwent_r); |
290 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_setpwent); |
291 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_endpwent); |
292 |
-+ |
293 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyname); |
294 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyname2); |
295 |
-+NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyaddr); |
296 |
-+ |
297 |
-+static ns_mtab methods[] = { |
298 |
-+{ NSDB_GROUP, "getgrnam_r", __nss_compat_getgrnam_r, _nss_ldap_getgrnam_r }, |
299 |
-+{ NSDB_GROUP, "getgrgid_r", __nss_compat_getgrgid_r, _nss_ldap_getgrgid_r }, |
300 |
-+{ NSDB_GROUP, "getgrent_r", __nss_compat_getgrent_r, _nss_ldap_getgrent_r }, |
301 |
-+{ NSDB_GROUP, "setgrent", __nss_compat_setgrent, _nss_ldap_setgrent }, |
302 |
-+{ NSDB_GROUP, "endgrent", __nss_compat_endgrent, _nss_ldap_endgrent }, |
303 |
-+{ NSDB_GROUP, "getgroupmembership", __freebsd_getgroupmembership, NULL }, |
304 |
-+ |
305 |
-+{ NSDB_PASSWD, "getpwnam_r", __nss_compat_getpwnam_r, _nss_ldap_getpwnam_r }, |
306 |
-+{ NSDB_PASSWD, "getpwuid_r", __nss_compat_getpwuid_r, _nss_ldap_getpwuid_r }, |
307 |
-+{ NSDB_PASSWD, "getpwent_r", __nss_compat_getpwent_r, _nss_ldap_getpwent_r }, |
308 |
-+{ NSDB_PASSWD, "setpwent", __nss_compat_setpwent, _nss_ldap_setpwent }, |
309 |
-+{ NSDB_PASSWD, "endpwent", __nss_compat_endpwent, _nss_ldap_endpwent }, |
310 |
-+ |
311 |
-+{ NSDB_HOSTS, "gethostbyname", __nss_compat_gethostbyname, _nss_ldap_gethostbyname_r }, |
312 |
-+{ NSDB_HOSTS, "gethostbyaddr", __nss_compat_gethostbyaddr, _nss_ldap_gethostbyaddr_r }, |
313 |
-+{ NSDB_HOSTS, "gethostbyname2", __nss_compat_gethostbyname2, _nss_ldap_gethostbyname2_r }, |
314 |
-+ |
315 |
-+{ NSDB_GROUP_COMPAT, "getgrnam_r", __nss_compat_getgrnam_r, _nss_ldap_getgrnam_r }, |
316 |
-+{ NSDB_GROUP_COMPAT, "getgrgid_r", __nss_compat_getgrgid_r, _nss_ldap_getgrgid_r }, |
317 |
-+{ NSDB_GROUP_COMPAT, "getgrent_r", __nss_compat_getgrent_r, _nss_ldap_getgrent_r }, |
318 |
-+{ NSDB_GROUP_COMPAT, "setgrent", __nss_compat_setgrent, _nss_ldap_setgrent }, |
319 |
-+{ NSDB_GROUP_COMPAT, "endgrent", __nss_compat_endgrent, _nss_ldap_endgrent }, |
320 |
-+ |
321 |
-+{ NSDB_PASSWD_COMPAT, "getpwnam_r", __nss_compat_getpwnam_r, _nss_ldap_getpwnam_r }, |
322 |
-+{ NSDB_PASSWD_COMPAT, "getpwuid_r", __nss_compat_getpwuid_r, _nss_ldap_getpwuid_r }, |
323 |
-+{ NSDB_PASSWD_COMPAT, "getpwent_r", __nss_compat_getpwent_r, _nss_ldap_getpwent_r }, |
324 |
-+{ NSDB_PASSWD_COMPAT, "setpwent", __nss_compat_setpwent, _nss_ldap_setpwent }, |
325 |
-+{ NSDB_PASSWD_COMPAT, "endpwent", __nss_compat_endpwent, _nss_ldap_endpwent }, |
326 |
-+ |
327 |
-+}; |
328 |
-+ |
329 |
-+ |
330 |
-+ns_mtab * |
331 |
-+nss_module_register(const char *source, unsigned int *mtabsize, |
332 |
-+ nss_module_unregister_fn *unreg) |
333 |
-+{ |
334 |
-+ *mtabsize = sizeof(methods)/sizeof(methods[0]); |
335 |
-+ *unreg = NULL; |
336 |
-+ return (methods); |
337 |
-+} |
338 |
-+ |
339 |
-+int __nss_compat_gethostbyname(void *retval, void *mdata, va_list ap) |
340 |
-+{ |
341 |
-+ enum nss_status (*fn)(const char *, struct hostent *, char *, size_t, int *, int *); |
342 |
-+ const char *name; |
343 |
-+ struct hostent *result; |
344 |
-+ char buffer[1024]; |
345 |
-+ size_t buflen = 1024; |
346 |
-+ int errnop; |
347 |
-+ int h_errnop; |
348 |
-+ int af; |
349 |
-+ enum nss_status status; |
350 |
-+ fn = mdata; |
351 |
-+ name = va_arg(ap, const char*); |
352 |
-+ af = va_arg(ap,int); |
353 |
-+ result = va_arg(ap,struct hostent *); |
354 |
-+ status = fn(name, result, buffer, buflen, &errnop, &h_errnop); |
355 |
-+ status = __nss_compat_result(status,errnop); |
356 |
-+ h_errno = h_errnop; |
357 |
-+ return (status); |
358 |
-+} |
359 |
-+ |
360 |
-+int __nss_compat_gethostbyname2(void *retval, void *mdata, va_list ap) |
361 |
-+{ |
362 |
-+ enum nss_status (*fn)(const char *, struct hostent *, char *, size_t, int *, int *); |
363 |
-+ const char *name; |
364 |
-+ struct hostent *result; |
365 |
-+ char buffer[1024]; |
366 |
-+ size_t buflen = 1024; |
367 |
-+ int errnop; |
368 |
-+ int h_errnop; |
369 |
-+ int af; |
370 |
-+ enum nss_status status; |
371 |
-+ fn = mdata; |
372 |
-+ name = va_arg(ap, const char*); |
373 |
-+ af = va_arg(ap,int); |
374 |
-+ result = va_arg(ap,struct hostent *); |
375 |
-+ status = fn(name, result, buffer, buflen, &errnop, &h_errnop); |
376 |
-+ status = __nss_compat_result(status,errnop); |
377 |
-+ h_errno = h_errnop; |
378 |
-+ return (status); |
379 |
-+} |
380 |
-+ |
381 |
-+int __nss_compat_gethostbyaddr(void *retval, void *mdata, va_list ap) |
382 |
-+{ |
383 |
-+ struct in_addr *addr; |
384 |
-+ int len; |
385 |
-+ int type; |
386 |
-+ struct hostent *result; |
387 |
-+ char buffer[1024]; |
388 |
-+ size_t buflen = 1024; |
389 |
-+ int errnop; |
390 |
-+ int h_errnop; |
391 |
-+ enum nss_status (*fn)(struct in_addr *, int, int, struct hostent *, char *, size_t, int *, int *); |
392 |
-+ enum nss_status status; |
393 |
-+ fn = mdata; |
394 |
-+ addr = va_arg(ap, struct in_addr*); |
395 |
-+ len = va_arg(ap,int); |
396 |
-+ type = va_arg(ap,int); |
397 |
-+ result = va_arg(ap, struct hostent*); |
398 |
-+ status = fn(addr, len, type, result, buffer, buflen, &errnop, &h_errnop); |
399 |
-+ status = __nss_compat_result(status,errnop); |
400 |
-+ h_errno = h_errnop; |
401 |
-+ return (status); |
402 |
-+} |
403 |
-+ |
404 |
-+static int |
405 |
-+__gr_addgid(gid_t gid, gid_t *groups, int maxgrp, int *groupc) |
406 |
-+{ |
407 |
-+ int ret, dupc; |
408 |
-+ |
409 |
-+ /* skip duplicates */ |
410 |
-+ for (dupc = 0; dupc < MIN(maxgrp, *groupc); dupc++) { |
411 |
-+ if (groups[dupc] == gid) |
412 |
-+ return 1; |
413 |
-+ } |
414 |
-+ |
415 |
-+ ret = 1; |
416 |
-+ if (*groupc < maxgrp) /* add this gid */ |
417 |
-+ groups[*groupc] = gid; |
418 |
-+ else |
419 |
-+ ret = 0; |
420 |
-+ (*groupc)++; |
421 |
-+ return ret; |
422 |
-+} |
423 |
-+ |
424 |
-+static int __freebsd_getgroupmembership(void *retval, void *mdata, va_list ap) |
425 |
-+{ |
426 |
-+ int err; |
427 |
-+ enum nss_status s; |
428 |
-+ const char *user = va_arg(ap, const char *); |
429 |
-+ gid_t group = va_arg(ap, gid_t); |
430 |
-+ gid_t *groups = va_arg(ap, gid_t *); |
431 |
-+ int limit = va_arg(ap, int); |
432 |
-+ int *size = va_arg(ap, int*); |
433 |
-+ gid_t *tmpgroups; |
434 |
-+ long int lstart, lsize; |
435 |
-+ int i; |
436 |
-+ |
437 |
-+ tmpgroups = malloc(limit * sizeof(gid_t)); |
438 |
-+ if (tmpgroups == NULL) |
439 |
-+ return NS_TRYAGAIN; |
440 |
-+ |
441 |
-+ /* insert primary membership */ |
442 |
-+ __gr_addgid(group, groups, limit, size); |
443 |
-+ |
444 |
-+ lstart = 0; |
445 |
-+ lsize = limit; |
446 |
-+ s = _nss_ldap_initgroups_dyn(user, group, &lstart, &lsize, |
447 |
-+ &tmpgroups, 0, &err); |
448 |
-+ if (s == NSS_STATUS_SUCCESS) { |
449 |
-+ for (i = 0; i < lstart; i++) |
450 |
-+ __gr_addgid(tmpgroups[i], groups, limit, size); |
451 |
-+ s = NSS_STATUS_NOTFOUND; |
452 |
-+ } |
453 |
-+ |
454 |
-+ free(tmpgroups); |
455 |
-+ |
456 |
-+ return __nss_compat_result(s, err); |
457 |
-+} |
458 |
|
459 |
diff --git a/sys-auth/nss_ldap/files/nss_ldap-265-installdir.patch b/sys-auth/nss_ldap/files/nss_ldap-265-installdir.patch |
460 |
deleted file mode 100644 |
461 |
index daf507ad594..00000000000 |
462 |
--- a/sys-auth/nss_ldap/files/nss_ldap-265-installdir.patch |
463 |
+++ /dev/null |
464 |
@@ -1,35 +0,0 @@ |
465 |
-Index: nss_ldap-265/Makefile.am |
466 |
-=================================================================== |
467 |
---- nss_ldap-265.orig/Makefile.am |
468 |
-+++ nss_ldap-265/Makefile.am |
469 |
-@@ -38,17 +38,13 @@ NSS_LDAP_LDFLAGS = @NSS_LDAP_LDFLAGS@ |
470 |
- DEFS = @DEFS@ |
471 |
- #INCLUDES = -I$(top_builddir) -I$(srcdir) |
472 |
- |
473 |
--if GCC |
474 |
--MULTI_OS_DIRECTORY=$(shell $(CC) $(CFLAGS) -print-multi-os-directory) |
475 |
--else |
476 |
- MULTI_OS_DIRECTORY=. |
477 |
--endif |
478 |
- |
479 |
- if GLIBC |
480 |
--LIBC_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed -e 's|.*libc-\(.*\)\.so|\1|') |
481 |
-+LIBC_VERS = $(shell ls @GENTOO_PORTAGE_EPREFIX@/lib/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed -e 's|.*libc-\(.*\)\.so|\1|') |
482 |
- NSS_LDAP_LIBC_VERSIONED = libnss_ldap-$(LIBC_VERS).so |
483 |
- |
484 |
--NSS_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libnss_files.so.? | tail -n 1 | sed -e 's|.*libnss_files\.so\.\(.*\)|\1|') |
485 |
-+NSS_VERS = $(shell ls @GENTOO_PORTAGE_EPREFIX@/lib/$(MULTI_OS_DIRECTORY)/libnss_files.so.? | tail -n 1 | sed -e 's|.*libnss_files\.so\.\(.*\)|\1|') |
486 |
- NSS_LDAP_NSS_VERSIONED = libnss_ldap.so.$(NSS_VERS) |
487 |
- endif |
488 |
- |
489 |
-@@ -83,8 +79,8 @@ if GLIBC |
490 |
- $(mkinstalldirs) $(DESTDIR)$(libdir) |
491 |
- $(INSTALL_PROGRAM) -o $(INST_UID) -g $(INST_GID) nss_ldap.so $(DESTDIR)$(libdir)/$(NSS_LDAP_LIBC_VERSIONED) |
492 |
- (cd $(DESTDIR)$(libdir); ln -sf $(NSS_LDAP_LIBC_VERSIONED) $(NSS_LDAP_NSS_VERSIONED)) |
493 |
-- $(mkinstalldirs) $(DESTDIR)/usr$(libdir) |
494 |
-- (cd $(DESTDIR)/usr$(libdir); ln -sf ../..$(libdir)/$(NSS_LDAP_NSS_VERSIONED) .) |
495 |
-+ $(mkinstalldirs) $(DESTDIR)$(libdir:/lib=/usr/lib) |
496 |
-+ (cd $(DESTDIR)/$(libdir:/lib=/usr/lib); ln -sf ../../lib/$(NSS_LDAP_NSS_VERSIONED) .) |
497 |
- else |
498 |
- $(mkinstalldirs) $(DESTDIR)$(libdir) |
499 |
- if HPUX |
500 |
|
501 |
diff --git a/sys-auth/nss_ldap/files/nss_ldap-265-libdir.patch b/sys-auth/nss_ldap/files/nss_ldap-265-libdir.patch |
502 |
deleted file mode 100644 |
503 |
index d3609b604a2..00000000000 |
504 |
--- a/sys-auth/nss_ldap/files/nss_ldap-265-libdir.patch |
505 |
+++ /dev/null |
506 |
@@ -1,31 +0,0 @@ |
507 |
---- a/Makefile.am |
508 |
-+++ b/Makefile.am |
509 |
-@@ -38,17 +38,13 @@ |
510 |
- DEFS = @DEFS@ |
511 |
- #INCLUDES = -I$(top_builddir) -I$(srcdir) |
512 |
- |
513 |
--if GCC |
514 |
--MULTI_OS_DIRECTORY=$(shell $(CC) $(CFLAGS) -print-multi-os-directory) |
515 |
--else |
516 |
- MULTI_OS_DIRECTORY=. |
517 |
--endif |
518 |
- |
519 |
- if GLIBC |
520 |
--LIBC_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed -e 's|.*libc-\(.*\)\.so|\1|') |
521 |
-+LIBC_VERS = $(shell ls @GENTOO_PORTAGE_EPREFIX@/lib/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed -e 's|.*libc-\(.*\)\.so|\1|') |
522 |
- NSS_LDAP_LIBC_VERSIONED = libnss_ldap-$(LIBC_VERS).so |
523 |
- |
524 |
--NSS_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libnss_files.so.? | tail -n 1 | sed -e 's|.*libnss_files\.so\.\(.*\)|\1|') |
525 |
-+NSS_VERS = $(shell ls @GENTOO_PORTAGE_EPREFIX@/lib/$(MULTI_OS_DIRECTORY)/libnss_files.so.? | tail -n 1 | sed -e 's|.*libnss_files\.so\.\(.*\)|\1|') |
526 |
- NSS_LDAP_NSS_VERSIONED = libnss_ldap.so.$(NSS_VERS) |
527 |
- endif |
528 |
- |
529 |
-@@ -83,8 +79,6 @@ |
530 |
- $(mkinstalldirs) $(DESTDIR)$(libdir) |
531 |
- $(INSTALL_PROGRAM) -o $(INST_UID) -g $(INST_GID) nss_ldap.so $(DESTDIR)$(libdir)/$(NSS_LDAP_LIBC_VERSIONED) |
532 |
- (cd $(DESTDIR)$(libdir); ln -sf $(NSS_LDAP_LIBC_VERSIONED) $(NSS_LDAP_NSS_VERSIONED)) |
533 |
-- $(mkinstalldirs) $(DESTDIR)/usr$(libdir) |
534 |
-- (cd $(DESTDIR)/usr$(libdir); ln -sf ../..$(libdir)/$(NSS_LDAP_NSS_VERSIONED) .) |
535 |
- else |
536 |
- $(mkinstalldirs) $(DESTDIR)$(libdir) |
537 |
- if HPUX |