Ignore:
Timestamp:
Jun 14, 2013, 12:50:47 PM (11 years ago)
Author:
achernya
Message:
Merge r2402-r2433 from trunk to branches/fc19-dev
Location:
branches/fc19-dev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/fc19-dev

  • branches/fc19-dev/server/common/oursrc/nss_nonlocal/nonlocal-passwd.c

    r1825 r2434  
    2626
    2727#define _GNU_SOURCE
     28
    2829#include <sys/types.h>
     30#include <dlfcn.h>
     31#include <errno.h>
     32#include <nss.h>
     33#include <pwd.h>
     34#include <stdbool.h>
     35#include <stddef.h>
     36#include <stdlib.h>
     37#include <string.h>
     38#include <syslog.h>
    2939#include <unistd.h>
    30 #include <stdlib.h>
    31 #include <stdint.h>
    32 #include <string.h>
    33 #include <dlfcn.h>
    34 #include <stdio.h>
    35 #include <syslog.h>
    36 #include <errno.h>
    37 #include <pwd.h>
    38 #include <grp.h>
    39 #include <nss.h>
     40
    4041#include "nsswitch-internal.h"
    4142#include "nonlocal.h"
     
    162163
    163164
     165static bool pwent_initialized = false;
    164166static service_user *pwent_startp, *pwent_nip;
    165167static void *pwent_fct_start;
     
    186188        return status;
    187189
    188     if (pwent_fct_start == NULL)
     190    if (!pwent_initialized) {
    189191        __nss_passwd_nonlocal_lookup(&pwent_startp, pwent_fct_name,
    190192                                     &pwent_fct_start);
     193        __sync_synchronize();
     194        pwent_initialized = true;
     195    }
    191196    pwent_nip = pwent_startp;
    192197    pwent_fct.ptr = pwent_fct_start;
     
    200205    const struct walk_nss w = {
    201206        .lookup = &__nss_passwd_nonlocal_lookup, .fct_name = "endpwent",
    202         .status = &status
     207        .status = &status, .all_values = 1,
    203208    };
    204209    const __typeof__(&_nss_nonlocal_endpwent) self = NULL;
Note: See TracChangeset for help on using the changeset viewer.