- service_user *nip;
- union {
- enum nss_status (*l)(const char *name, struct spwd *pwd,
- char *buffer, size_t buflen, int *errnop);
- void *ptr;
- } fct;
-
- nip = nss_shadow_nonlocal_database();
- if (nip == NULL)
- return NSS_STATUS_UNAVAIL;
- if (fct_start == NULL)
- fct_start = __nss_lookup_function(nip, fct_name);
- fct.ptr = fct_start;
- do {
- if (fct.ptr == NULL)
- status = NSS_STATUS_UNAVAIL;
- else
- status = DL_CALL_FCT(fct.l, (name, pwd, buffer, buflen, errnop));
- if (status == NSS_STATUS_TRYAGAIN && *errnop == ERANGE)
- break;
- } while (__nss_next(&nip, fct_name, &fct.ptr, status, 0) == 0);
+ const struct walk_nss w = {
+ .lookup = __nss_shadow_nonlocal_lookup, .fct_name = "getspnam_r",
+ .status = &status, .errnop = errnop
+ };
+ const __typeof__(&_nss_nonlocal_getspnam_r) self = NULL;
+#define args (name, pwd, buffer, buflen, errnop)
+#include "walk_nss.h"
+#undef args