}
+static bool pwent_initialized = false;
static service_user *pwent_startp, *pwent_nip;
static void *pwent_fct_start;
static union {
if (status != NSS_STATUS_SUCCESS)
return status;
- if (pwent_fct_start == NULL)
+ if (!pwent_initialized) {
__nss_passwd_nonlocal_lookup(&pwent_startp, pwent_fct_name,
&pwent_fct_start);
+ __sync_synchronize();
+ pwent_initialized = true;
+ }
pwent_nip = pwent_startp;
pwent_fct.ptr = pwent_fct_start;
return NSS_STATUS_SUCCESS;
enum nss_status status;
const struct walk_nss w = {
.lookup = &__nss_passwd_nonlocal_lookup, .fct_name = "endpwent",
- .status = &status
+ .status = &status, .all_values = 1,
};
const __typeof__(&_nss_nonlocal_endpwent) self = NULL;