Back to index

glibc  2.9
Classes | Defines | Typedefs | Enumerations | Functions | Variables
nsswitch.h File Reference
#include <arpa/nameser.h>
#include <netinet/in.h>
#include <nss.h>
#include <resolv.h>
#include <search.h>
#include <dlfcn.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  service_library
struct  known_function
struct  service_user
struct  name_database_entry
struct  name_database

Defines

#define nss_next_action(ni, status)   ((ni)->actions[2 + status])

Typedefs

typedef struct service_library service_library
typedef struct service_user service_user
typedef struct name_database_entry name_database_entry
typedef struct name_database name_database
typedef int(* db_lookup_function )(service_user **, const char *, const char *, void **) internal_function
typedef enum nss_status(* setent_function )(int)
typedef enum nss_status(* endent_function )(void)
typedef enum nss_status(* getent_function )(void *, char *, size_t, int *, int *)
typedef int(* getent_r_function )(void *, char *, size_t, void **result, int *)

Enumerations

enum  lookup_actions { NSS_ACTION_CONTINUE, NSS_ACTION_RETURN }

Functions

int __nss_database_lookup (const char *database, const char *alternative_name, const char *defconfig, service_user **ni)
 libc_hidden_proto (__nss_database_lookup) extern int __nss_lookup(service_user **ni
int __nss_next2 (service_user **ni, const char *fct_name, const char *fct2_name, void **fctp, int status, int all_values) attribute_hidden
 libc_hidden_proto (__nss_next2) extern int __nss_next(service_user **ni
void * __nss_lookup_function (service_user *ni, const char *fct_name)
 libc_hidden_proto (__nss_lookup_function) extern void __nss_disable_nscd(void)
void __nss_setent (const char *func_name, db_lookup_function lookup_fct, service_user **nip, service_user **startp, service_user **last_nip, int stayon, int *stayon_tmp, int res)
void __nss_endent (const char *func_name, db_lookup_function lookup_fct, service_user **nip, service_user **startp, service_user **last_nip, int res)
int __nss_getent_r (const char *getent_func_name, const char *setent_func_name, db_lookup_function lookup_fct, service_user **nip, service_user **startp, service_user **last_nip, int *stayon_tmp, int res, void *resbuf, char *buffer, size_t buflen, void **result, int *h_errnop)
void * __nss_getent (getent_r_function func, void **resbuf, char **buffer, size_t buflen, size_t *buffer_size, int *h_errnop)
int __nss_hostname_digits_dots (const char *name, struct hostent *resbuf, char **buffer, size_t *buffer_size, size_t buflen, struct hostent **result, enum nss_status *status, int af, int *h_errnop)

Variables

const char * fct_name
const char const char * fct2_name
const char const char void **fctp attribute_hidden
const char void ** fctp
const char void int status
const char void int int all_values

Class Documentation

struct service_library

Definition at line 40 of file nsswitch.h.

Collaboration diagram for service_library:
Class Members
void * lib_handle
const char * name
struct service_library * next
struct known_function

Definition at line 54 of file nsswitch.h.

Class Members
const char * fct_name
void * fct_ptr
struct service_user

Definition at line 61 of file nsswitch.h.

Collaboration diagram for service_user:
Class Members
lookup_actions actions
void * known
service_library * library
char name
struct service_user * next
struct name_database_entry

Definition at line 79 of file nsswitch.h.

Collaboration diagram for name_database_entry:
Class Members
char name
struct name_database_entry * next
service_user * service
struct name_database

Definition at line 90 of file nsswitch.h.

Collaboration diagram for name_database:
Class Members
name_database_entry * entry
service_library * library

Define Documentation

#define nss_next_action (   ni,
  status 
)    ((ni)->actions[2 + status])

Definition at line 76 of file nsswitch.h.


Typedef Documentation

typedef int(* db_lookup_function)(service_user **, const char *, const char *, void **) internal_function

Definition at line 146 of file nsswitch.h.

typedef enum nss_status(* endent_function)(void)

Definition at line 150 of file nsswitch.h.

typedef enum nss_status(* getent_function)(void *, char *, size_t, int *, int *)

Definition at line 151 of file nsswitch.h.

typedef int(* getent_r_function)(void *, char *, size_t, void **result, int *)

Definition at line 153 of file nsswitch.h.

typedef struct name_database name_database
typedef struct service_user service_user
typedef enum nss_status(* setent_function)(int)

Definition at line 149 of file nsswitch.h.


Enumeration Type Documentation

Enumerator:
NSS_ACTION_CONTINUE 
NSS_ACTION_RETURN 

Definition at line 33 of file nsswitch.h.


Function Documentation

int __nss_database_lookup ( const char *  database,
const char *  alternative_name,
const char *  defconfig,
service_user **  ni 
)

Here is the caller graph for this function:

void __nss_endent ( const char *  func_name,
db_lookup_function  lookup_fct,
service_user **  nip,
service_user **  startp,
service_user **  last_nip,
int  res 
)

Definition at line 94 of file getnssent_r.c.

{
  union
  {
    endent_function f;
    void *ptr;
  } fct;
  int no_more;

  if (res && __res_maybe_init (&_res, 0) == -1)
    {
      __set_h_errno (NETDB_INTERNAL);
      return;
    }

  /* Cycle through all the services and run their endXXent functions.  */
  no_more = setup (func_name, lookup_fct, &fct.ptr, nip, startp, 1);
  while (! no_more)
    {
      /* Ignore status, we force check in __NSS_NEXT.  */
      DL_CALL_FCT (fct.f, ());

      if (*nip == *last_nip)
       /* We have processed all services which were used.  */
       break;

      no_more = __nss_next2 (nip, func_name, NULL, &fct.ptr, 0, 1);
    }
  *last_nip = *nip = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void* __nss_getent ( getent_r_function  func,
void **  resbuf,
char **  buffer,
size_t  buflen,
size_t buffer_size,
int h_errnop 
)

Definition at line 25 of file getnssent.c.

{
  void *result;

  if (*buffer == NULL)
    {
      *buffer_size = buflen;
      *buffer = malloc (*buffer_size);
    }

  while (buffer != NULL
        && func (resbuf, *buffer, *buffer_size, &result, h_errnop) == ERANGE
        && (h_errnop == NULL || *h_errnop == NETDB_INTERNAL))
    {
      char *new_buf;
      *buffer_size *= 2;
      new_buf = realloc (*buffer, *buffer_size);
      if (new_buf == NULL)
       {
         /* We are out of memory.  Free the current buffer so that the
            process gets a chance for a normal termination.  */
         int save = errno;
         free (*buffer);
         __set_errno (save);
       }
      *buffer = new_buf;
    }

  if (*buffer == NULL)
    result = NULL;

  return result;
}

Here is the caller graph for this function:

int __nss_getent_r ( const char *  getent_func_name,
const char *  setent_func_name,
db_lookup_function  lookup_fct,
service_user **  nip,
service_user **  startp,
service_user **  last_nip,
int stayon_tmp,
int  res,
void *  resbuf,
char *  buffer,
size_t  buflen,
void **  result,
int h_errnop 
)

Definition at line 129 of file getnssent_r.c.

{
  union
  {
    getent_function f;
    void *ptr;
  } fct;
  int no_more;
  enum nss_status status;

  if (res && __res_maybe_init (&_res, 0) == -1)
    {
      *h_errnop = NETDB_INTERNAL;
      *result = NULL;
      return errno;
    }

  /* Initialize status to return if no more functions are found.  */
  status = NSS_STATUS_NOTFOUND;

  /* Run through available functions, starting with the same function last
     run.  We will repeat each function as long as it succeeds, and then go
     on to the next service action.  */
  no_more = setup (getent_func_name, lookup_fct, &fct.ptr, nip,
                 startp, 0);
  while (! no_more)
    {
      int is_last_nip = *nip == *last_nip;

      status = DL_CALL_FCT (fct.f,
                         (resbuf, buffer, buflen, &errno, &h_errno));

      /* The the status is NSS_STATUS_TRYAGAIN and errno is ERANGE the
        provided buffer is too small.  In this case we should give
        the user the possibility to enlarge the buffer and we should
        not simply go on with the next service (even if the TRYAGAIN
        action tells us so).  */
      if (status == NSS_STATUS_TRYAGAIN
         && (h_errnop == NULL || *h_errnop == NETDB_INTERNAL)
         && errno == ERANGE)
       break;

      do
       {
         no_more = __nss_next2 (nip, getent_func_name, NULL, &fct.ptr,
                             status, 0);

         if (is_last_nip)
           *last_nip = *nip;

         if (! no_more)
           {
             /* Call the `setXXent' function.  This wasn't done before.  */
             union
             {
              setent_function f;
              void *ptr;
             } sfct;

             no_more = __nss_lookup (nip, setent_func_name, NULL, &sfct.ptr);

             if (! no_more)
               {
                if (stayopen_tmp)
                  status = DL_CALL_FCT (sfct.f, (*stayopen_tmp));
                else
                  status = DL_CALL_FCT (sfct.f, (0));
              }
             else
              status = NSS_STATUS_NOTFOUND;
           }
       }
      while (! no_more && status != NSS_STATUS_SUCCESS);
    }

  *result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
  return (status == NSS_STATUS_SUCCESS ? 0
         : status != NSS_STATUS_TRYAGAIN ? ENOENT
         /* h_errno functions only set errno if h_errno is NETDB_INTERNAL.  */
         : (h_errnop == NULL || *h_errnop == NETDB_INTERNAL) ? errno
         : EAGAIN);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int __nss_hostname_digits_dots ( const char *  name,
struct hostent resbuf,
char **  buffer,
size_t buffer_size,
size_t  buflen,
struct hostent **  result,
enum nss_status status,
int  af,
int h_errnop 
)

Definition at line 37 of file digits_dots.c.

{
  int save;

  /* We have to test for the use of IPv6 which can only be done by
     examining `_res'.  */
  if (__res_maybe_init (&_res, 0) == -1)
    {
      if (h_errnop)
       *h_errnop = NETDB_INTERNAL;
      *result = NULL;
      return -1;
    }

  /*
   * disallow names consisting only of digits/dots, unless
   * they end in a dot.
   */
  if (isdigit (name[0]) || isxdigit (name[0]) || name[0] == ':')
    {
      const char *cp;
      char *hostname;
      typedef unsigned char host_addr_t[16];
      host_addr_t *host_addr;
      typedef char *host_addr_list_t[2];
      host_addr_list_t *h_addr_ptrs;
      char **h_alias_ptr;
      size_t size_needed;
      int addr_size;

      switch (af)
       {
       case AF_INET:
         addr_size = INADDRSZ;
         break;

       case AF_INET6:
         addr_size = IN6ADDRSZ;
         break;

       default:
         af = (_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET;
         addr_size = af == AF_INET6 ? IN6ADDRSZ : INADDRSZ;
         break;
       }

      size_needed = (sizeof (*host_addr)
                   + sizeof (*h_addr_ptrs) + strlen (name) + 1);

      if (buffer_size == NULL)
        {
         if (buflen < size_needed)
           {
             if (h_errnop != NULL)
              *h_errnop = TRY_AGAIN;
             __set_errno (ERANGE);
             goto done;
           }
       }
      else if (buffer_size != NULL && *buffer_size < size_needed)
       {
         char *new_buf;
         *buffer_size = size_needed;
         new_buf = (char *) realloc (*buffer, *buffer_size);

         if (new_buf == NULL)
           {
             save = errno;
             free (*buffer);
             *buffer = NULL;
             *buffer_size = 0;
             __set_errno (save);
             if (h_errnop != NULL)
              *h_errnop = TRY_AGAIN;
             *result = NULL;
             goto done;
           }
         *buffer = new_buf;
       }

      memset (*buffer, '\0', size_needed);

      host_addr = (host_addr_t *) *buffer;
      h_addr_ptrs = (host_addr_list_t *)
       ((char *) host_addr + sizeof (*host_addr));
      h_alias_ptr = (char **) ((char *) h_addr_ptrs + sizeof (*h_addr_ptrs));
      hostname = (char *) h_alias_ptr + sizeof (*h_alias_ptr);

      if (isdigit (name[0]))
       {
         for (cp = name;; ++cp)
           {
             if (*cp == '\0')
              {
                int ok;

                if (*--cp == '.')
                  break;

                /* All-numeric, no dot at the end. Fake up a hostent as if
                   we'd actually done a lookup.  What if someone types
                   255.255.255.255?  The test below will succeed
                   spuriously... ???  */
                if (af == AF_INET)
                  ok = __inet_aton (name, (struct in_addr *) host_addr);
                else
                  {
                    assert (af == AF_INET6);
                    ok = inet_pton (af, name, host_addr) > 0;
                  }
                if (! ok)
                  {
                    *h_errnop = HOST_NOT_FOUND;
                    if (buffer_size)
                     *result = NULL;
                    goto done;
                  }

                resbuf->h_name = strcpy (hostname, name);
                h_alias_ptr[0] = NULL;
                resbuf->h_aliases = h_alias_ptr;
                (*h_addr_ptrs)[0] = (char *) host_addr;
                (*h_addr_ptrs)[1] = NULL;
                resbuf->h_addr_list = *h_addr_ptrs;
                if (af == AF_INET && (_res.options & RES_USE_INET6))
                  {
                    /* We need to change the IP v4 address into the
                      IP v6 address.  */
                    char tmp[INADDRSZ];
                    char *p = (char *) host_addr;
                    int i;

                    /* Save a copy of the IP v4 address. */
                    memcpy (tmp, host_addr, INADDRSZ);
                    /* Mark this ipv6 addr as a mapped ipv4. */
                    for (i = 0; i < 10; i++)
                     *p++ = 0x00;
                    *p++ = 0xff;
                    *p++ = 0xff;
                    /* Copy the IP v4 address. */
                    memcpy (p, tmp, INADDRSZ);
                    resbuf->h_addrtype = AF_INET6;
                    resbuf->h_length = IN6ADDRSZ;
                  }
                else
                  {
                    resbuf->h_addrtype = af;
                    resbuf->h_length = addr_size;
                  }
                if (h_errnop != NULL)
                  *h_errnop = NETDB_SUCCESS;
                if (buffer_size == NULL)
                  *status = NSS_STATUS_SUCCESS;
                else
                 *result = resbuf;
                goto done;
              }

             if (!isdigit (*cp) && *cp != '.')
              break;
           }
       }

      if ((isxdigit (name[0]) && strchr (name, ':') != NULL) || name[0] == ':')
       {
         const char *cp;
         char *hostname;
         typedef unsigned char host_addr_t[16];
         host_addr_t *host_addr;
         typedef char *host_addr_list_t[2];
         host_addr_list_t *h_addr_ptrs;
         size_t size_needed;
         int addr_size;

         switch (af)
           {
           default:
             af = (_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET;
             if (af == AF_INET6)
              {
                addr_size = IN6ADDRSZ;
                break;
              }
             /* FALLTHROUGH */

           case AF_INET:
             /* This is not possible.  We cannot represent an IPv6 address
               in an `struct in_addr' variable.  */
             *h_errnop = HOST_NOT_FOUND;
             *result = NULL;
             goto done;

           case AF_INET6:
             addr_size = IN6ADDRSZ;
             break;
           }

         size_needed = (sizeof (*host_addr)
                      + sizeof (*h_addr_ptrs) + strlen (name) + 1);

         if (buffer_size == NULL && buflen < size_needed)
           {
             if (h_errnop != NULL)
              *h_errnop = TRY_AGAIN;
             __set_errno (ERANGE);
             goto done;
           }
         else if (buffer_size != NULL && *buffer_size < size_needed)
           {
             char *new_buf;
             *buffer_size = size_needed;
             new_buf = realloc (*buffer, *buffer_size);

             if (new_buf == NULL)
              {
                save = errno;
                free (*buffer);
                __set_errno (save);
                *buffer = NULL;
                *buffer_size = 0;
                *result = NULL;
                goto done;
              }
             *buffer = new_buf;
           }

         memset (*buffer, '\0', size_needed);

         host_addr = (host_addr_t *) *buffer;
         h_addr_ptrs = (host_addr_list_t *)
           ((char *) host_addr + sizeof (*host_addr));
         hostname = (char *) h_addr_ptrs + sizeof (*h_addr_ptrs);

         for (cp = name;; ++cp)
           {
             if (!*cp)
              {
                if (*--cp == '.')
                  break;

                /* All-IPv6-legal, no dot at the end. Fake up a
                   hostent as if we'd actually done a lookup.  */
                if (inet_pton (AF_INET6, name, host_addr) <= 0)
                  {
                    *h_errnop = HOST_NOT_FOUND;
                    if (buffer_size)
                     *result = NULL;
                    goto done;
                  }

                resbuf->h_name = strcpy (hostname, name);
                h_alias_ptr[0] = NULL;
                resbuf->h_aliases = h_alias_ptr;
                (*h_addr_ptrs)[0] = (char *) host_addr;
                (*h_addr_ptrs)[1] = (char *) 0;
                resbuf->h_addr_list = *h_addr_ptrs;
                resbuf->h_addrtype = AF_INET6;
                resbuf->h_length = addr_size;
                *h_errnop = NETDB_SUCCESS;
                if (buffer_size == NULL)
                  *status = NSS_STATUS_SUCCESS;
                else
                  *result = resbuf;
                goto done;
              }

             if (!isxdigit (*cp) && *cp != ':' && *cp != '.')
              break;
           }
       }
    }

  return 0;

done:
  return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void* __nss_lookup_function ( service_user ni,
const char *  fct_name 
)

Definition at line 285 of file nsswitch.c.

{
  void **found, *result;

  /* We now modify global data.  Protect it.  */
  __libc_lock_lock (lock);

  /* Search the tree of functions previously requested.  Data in the
     tree are `known_function' structures, whose first member is a
     `const char *', the lookup key.  The search returns a pointer to
     the tree node structure; the first member of the is a pointer to
     our structure (i.e. what will be a `known_function'); since the
     first member of that is the lookup key string, &FCT_NAME is close
     enough to a pointer to our structure to use as a lookup key that
     will be passed to `known_compare' (above).  */

  found = __tsearch (&fct_name, &ni->known, &known_compare);
  if (*found != &fct_name)
    /* The search found an existing structure in the tree.  */
    result = ((known_function *) *found)->fct_ptr;
  else
    {
      /* This name was not known before.  Now we have a node in the tree
        (in the proper sorted position for FCT_NAME) that points to
        &FCT_NAME instead of any real `known_function' structure.
        Allocate a new structure and fill it in.  */

      known_function *known = malloc (sizeof *known);
      if (! known)
       {
       remove_from_tree:
         /* Oops.  We can't instantiate this node properly.
            Remove it from the tree.  */
         __tdelete (&fct_name, &ni->known, &known_compare);
         result = NULL;
       }
      else
       {
         /* Point the tree node at this new structure.  */
         *found = known;
         known->fct_name = fct_name;

         if (ni->library == NULL)
           {
             /* This service has not yet been used.  Fetch the service
               library for it, creating a new one if need be.  If there
               is no service table from the file, this static variable
               holds the head of the service_library list made from the
               default configuration.  */
             static name_database default_table;
             ni->library = nss_new_service (service_table ?: &default_table,
                                        ni->name);
             if (ni->library == NULL)
              {
                /* This only happens when out of memory.  */
                free (known);
                goto remove_from_tree;
              }
           }

#if !defined DO_STATIC_NSS || defined SHARED
         if (ni->library->lib_handle == NULL)
           {
             /* Load the shared library.  */
             size_t shlen = (7 + strlen (ni->library->name) + 3
                           + strlen (__nss_shlib_revision) + 1);
             int saved_errno = errno;
             char shlib_name[shlen];

             /* Construct shared object name.  */
             __stpcpy (__stpcpy (__stpcpy (__stpcpy (shlib_name,
                                                "libnss_"),
                                       ni->library->name),
                              ".so"),
                     __nss_shlib_revision);

             ni->library->lib_handle = __libc_dlopen (shlib_name);
             if (ni->library->lib_handle == NULL)
              {
                /* Failed to load the library.  */
                ni->library->lib_handle = (void *) -1l;
                __set_errno (saved_errno);
              }
           }

         if (ni->library->lib_handle == (void *) -1l)
           /* Library not found => function not found.  */
           result = NULL;
         else
           {
             /* Get the desired function.  */
             size_t namlen = (5 + strlen (ni->library->name) + 1
                            + strlen (fct_name) + 1);
             char name[namlen];

             /* Construct the function name.  */
             __stpcpy (__stpcpy (__stpcpy (__stpcpy (name, "_nss_"),
                                       ni->library->name),
                              "_"),
                     fct_name);

             /* Look up the symbol.  */
             result = __libc_dlsym (ni->library->lib_handle, name);
           }
#else
         /* We can't get function address dynamically in static linking. */
         {
# define DEFINE_ENT(h,nm)                                            \
           { #h"_get"#nm"ent_r", _nss_##h##_get##nm##ent_r },               \
           { #h"_end"#nm"ent", _nss_##h##_end##nm##ent },                   \
           { #h"_set"#nm"ent", _nss_##h##_set##nm##ent },
# define DEFINE_GET(h,nm)                                            \
           { #h"_get"#nm"_r", _nss_##h##_get##nm##_r },
# define DEFINE_GETBY(h,nm,ky)                                              \
           { #h"_get"#nm"by"#ky"_r", _nss_##h##_get##nm##by##ky##_r },
           static struct fct_tbl { const char *fname; void *fp; } *tp, tbl[] =
             {
# include "function.def"
              { NULL, NULL }
             };
           size_t namlen = (5 + strlen (ni->library->name) + 1
                          + strlen (fct_name) + 1);
           char name[namlen];

           /* Construct the function name.  */
           __stpcpy (__stpcpy (__stpcpy (name, ni->library->name),
                            "_"),
                    fct_name);

           result = NULL;
           for (tp = &tbl[0]; tp->fname; tp++)
             if (strcmp (tp->fname, name) == 0)
              {
                result = tp->fp;
                break;
              }
         }
#endif

         /* Remember function pointer for later calls.  Even if null, we
            record it so a second try needn't search the library again.  */
         known->fct_ptr = result;
       }
    }

  /* Remove the lock.  */
  __libc_lock_unlock (lock);

  return result;
}

Here is the call graph for this function:

int __nss_next2 ( service_user **  ni,
const char *  fct_name,
const char *  fct2_name,
void **  fctp,
int  status,
int  all_values 
)

Definition at line 174 of file nsswitch.c.

{
  if (all_values)
    {
      if (nss_next_action (*ni, NSS_STATUS_TRYAGAIN) == NSS_ACTION_RETURN
         && nss_next_action (*ni, NSS_STATUS_UNAVAIL) == NSS_ACTION_RETURN
         && nss_next_action (*ni, NSS_STATUS_NOTFOUND) == NSS_ACTION_RETURN
         && nss_next_action (*ni, NSS_STATUS_SUCCESS) == NSS_ACTION_RETURN)
       return 1;
    }
  else
    {
      /* This is really only for debugging.  */
      if (__builtin_expect (NSS_STATUS_TRYAGAIN > status
                         || status > NSS_STATUS_RETURN, 0))
        __libc_fatal ("illegal status in __nss_next");

       if (nss_next_action (*ni, status) == NSS_ACTION_RETURN)
        return 1;
    }

  if ((*ni)->next == NULL)
    return -1;

  do
    {
      *ni = (*ni)->next;

      *fctp = __nss_lookup_function (*ni, fct_name);
      if (*fctp == NULL && fct2_name != NULL)
       *fctp = __nss_lookup_function (*ni, fct2_name);
    }
  while (*fctp == NULL
        && nss_next_action (*ni, NSS_STATUS_UNAVAIL) == NSS_ACTION_CONTINUE
        && (*ni)->next != NULL);

  return *fctp != NULL ? 0 : -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void __nss_setent ( const char *  func_name,
db_lookup_function  lookup_fct,
service_user **  nip,
service_user **  startp,
service_user **  last_nip,
int  stayon,
int stayon_tmp,
int  res 
)

Definition at line 51 of file getnssent_r.c.

{
  union
  {
    setent_function f;
    void *ptr;
  } fct;
  int no_more;

  if (res && __res_maybe_init (&_res, 0) == -1)
    {
      __set_h_errno (NETDB_INTERNAL);
      return;
    }

  /* Cycle through the services and run their `setXXent' functions until
     we find an available service.  */
  no_more = setup (func_name, lookup_fct, &fct.ptr, nip,
                 startp, 1);
  while (! no_more)
    {
      int is_last_nip = *nip == *last_nip;
      enum nss_status status;

      if (stayopen_tmp)
       status = DL_CALL_FCT (fct.f, (*stayopen_tmp));
      else
       status = DL_CALL_FCT (fct.f, (0));

      no_more = __nss_next2 (nip, func_name, NULL, &fct.ptr, status, 0);
      if (is_last_nip)
       *last_nip = *nip;
    }

  if (stayopen_tmp)
    *stayopen_tmp = stayopen;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char void int int all_values

Definition at line 133 of file nsswitch.h.

const char const char void** fctp attribute_hidden

Definition at line 113 of file nsswitch.h.

const char const char* fct2_name

Definition at line 113 of file nsswitch.h.

const char * fct_name

Definition at line 113 of file nsswitch.h.

const char void** fctp

Definition at line 133 of file nsswitch.h.

const char void int status

Definition at line 133 of file nsswitch.h.