return status;
}
+static bool grent_initialized = false;
static service_user *grent_startp, *grent_nip;
static void *grent_fct_start;
static union {
if (status != NSS_STATUS_SUCCESS)
return status;
- if (grent_fct_start == NULL)
+ if (!grent_initialized) {
__nss_group_nonlocal_lookup(&grent_startp, grent_fct_name,
&grent_fct_start);
+ __sync_synchronize();
+ grent_initialized = true;
+ }
grent_nip = grent_startp;
grent_fct.ptr = grent_fct_start;
return NSS_STATUS_SUCCESS;
enum nss_status status;
const struct walk_nss w = {
.lookup = &__nss_group_nonlocal_lookup, .fct_name = "endgrent",
- .status = &status
+ .status = &status, .all_values = 1,
};
const __typeof__(&_nss_nonlocal_endgrent) self = NULL;
enum nss_status status;
const struct walk_nss w = {
.lookup = &__nss_group_nonlocal_lookup, .fct_name = "initgroups_dyn",
- .status = &status, .errnop = errnop
+ .status = &status, .all_values = 1, .errnop = errnop
};
const __typeof__(&_nss_nonlocal_initgroups_dyn) self = NULL;
#define args (user, group, start, size, groupsp, limit, errnop)
#include "walk_nss.h"
#undef args
- if (status != NSS_STATUS_SUCCESS)
+ if (status == NSS_STATUS_NOTFOUND || status == NSS_STATUS_UNAVAIL)
+ return NSS_STATUS_SUCCESS;
+ else if (status != NSS_STATUS_SUCCESS)
return status;
for (; in < *start; ++in) {