Back to index

glibc  2.9
Defines | Functions
shadow.h File Reference
#include <shadow/shadow.h>

Go to the source code of this file.

Defines

#define DECLARE_NSS_PROTOTYPES(service)

Functions

int __getspent_r (struct spwd *__result_buf, char *__buffer, size_t __buflen, struct spwd **__result) attribute_hidden
int __old_getspent_r (struct spwd *__result_buf, char *__buffer, size_t __buflen, struct spwd **__result)
int __getspnam_r (__const char *__name, struct spwd *__result_buf, char *__buffer, size_t __buflen, struct spwd **__result)
int __old_getspnam_r (__const char *__name, struct spwd *__result_buf, char *__buffer, size_t __buflen, struct spwd **__result)
int __sgetspent_r (__const char *__string, struct spwd *__result_buf, char *__buffer, size_t __buflen, struct spwd **__result)
int __fgetspent_r (FILE *__stream, struct spwd *__result_buf, char *__buffer, size_t __buflen, struct spwd **__result)
int __lckpwdf (void)
int __ulckpwdf (void)
int _nss_files_parse_spent (char *line, struct spwd *result, struct parser_data *data, size_t datalen, int *errnop)

Define Documentation

#define DECLARE_NSS_PROTOTYPES (   service)
Value:
extern enum nss_status _nss_ ## service ## _setspent (int);           \
extern enum nss_status _nss_ ## service ## _endspent (void);          \
extern enum nss_status _nss_ ## service ## _getspent_r                \
                       (struct spwd *pwd, char *buffer, size_t buflen,       \
                     int *errnop);                             \
extern enum nss_status _nss_ ## service ## _getspnam_r                \
                       (const char *name, struct spwd *pwd,           \
                     char *buffer, size_t buflen, int *errnop);

Function Documentation

int __fgetspent_r ( FILE __stream,
struct spwd __result_buf,
char *  __buffer,
size_t  __buflen,
struct spwd **  __result 
)

Definition at line 42 of file fgetspent_r.c.

{
  char *p;

  flockfile (stream);
  do
    {
      buffer[buflen - 1] = '\xff';
      p = fgets_unlocked (buffer, buflen, stream);
      if (p == NULL && feof_unlocked (stream))
       {
         funlockfile (stream);
         *result = NULL;
         __set_errno (ENOENT);
         return errno;
       }
      if (p == NULL || buffer[buflen - 1] != '\xff')
       {
         funlockfile (stream);
         *result = NULL;
         __set_errno (ERANGE);
         return errno;
       }

      /* Skip leading blanks.  */
      while (isspace (*p))
       ++p;
    } while (*p == '\0' || *p == '#' ||   /* Ignore empty and comment lines.  */
            /* Parse the line.  If it is invalid, loop to
              get the next line of the file to parse.  */
            ! parse_line (buffer, (void *) resbuf, NULL, 0, &errno));

  funlockfile (stream);

  *result = resbuf;
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int __getspent_r ( struct spwd __result_buf,
char *  __buffer,
size_t  __buflen,
struct spwd **  __result 
)
int __getspnam_r ( __const char *  __name,
struct spwd __result_buf,
char *  __buffer,
size_t  __buflen,
struct spwd **  __result 
)
int __lckpwdf ( void  )
int __old_getspent_r ( struct spwd __result_buf,
char *  __buffer,
size_t  __buflen,
struct spwd **  __result 
)
int __old_getspnam_r ( __const char *  __name,
struct spwd __result_buf,
char *  __buffer,
size_t  __buflen,
struct spwd **  __result 
)
int __sgetspent_r ( __const char *  __string,
struct spwd __result_buf,
char *  __buffer,
size_t  __buflen,
struct spwd **  __result 
)

Here is the caller graph for this function:

int __ulckpwdf ( void  )
int _nss_files_parse_spent ( char *  line,
struct spwd result,
struct parser_data data,
size_t  datalen,
int errnop 
)

Here is the caller graph for this function: