Ignore:
Timestamp:
Jun 14, 2013, 12:50:47 PM (9 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-shadow.c

    r1825 r2434  
    2424
    2525#define _GNU_SOURCE
     26
    2627#include <sys/types.h>
    27 #include <unistd.h>
     28#include <dlfcn.h>
     29#include <errno.h>
     30#include <nss.h>
     31#include <shadow.h>
     32#include <stdbool.h>
     33#include <stddef.h>
    2834#include <stdlib.h>
    29 #include <stdint.h>
    3035#include <string.h>
    31 #include <dlfcn.h>
    32 #include <stdio.h>
    3336#include <syslog.h>
    34 #include <errno.h>
    35 #include <shadow.h>
    36 #include <nss.h>
    3737
    3838#include "nsswitch-internal.h"
     
    5959
    6060
     61static bool spent_initialized = false;
    6162static service_user *spent_startp, *spent_nip;
    6263static void *spent_fct_start;
     
    8384        return status;
    8485
    85     if (spent_fct_start == NULL)
     86    if (!spent_initialized) {
    8687        __nss_shadow_nonlocal_lookup(&spent_startp, spent_fct_name,
    8788                                     &spent_fct_start);
     89        __sync_synchronize();
     90        spent_initialized = true;
     91    }
    8892    spent_nip = spent_startp;
    8993    spent_fct.ptr = spent_fct_start;
     
    114118{
    115119    enum nss_status status;
     120
     121    char *nonlocal_ignore = getenv(NONLOCAL_IGNORE_ENV);
     122    if (nonlocal_ignore != NULL && nonlocal_ignore[0] != '\0')
     123        return NSS_STATUS_UNAVAIL;
     124
    116125    if (spent_nip == NULL) {
    117126        status = _nss_nonlocal_setspent(0);
Note: See TracChangeset for help on using the changeset viewer.