openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/nss-pam-ldapd/0.9.8-r0/nss-pam-ldapd-0.9.8/nss/passwd.c
static nss_status_t read_passwd(TFILE* fp, struct passwd* result, char* buffer,
                                size_t buflen, int* errnop)
{
    int32_t tmpint32;
    size_t bufptr = 0;
    memset(result, 0, sizeof(struct passwd));
    READ_BUF_STRING(fp, result->pw_name);
    READ_BUF_STRING(fp, result->pw_passwd);
    READ_INT32(fp, result->pw_uid);
    READ_INT32(fp, result->pw_gid);
    READ_BUF_STRING(fp, result->pw_gecos);
    READ_BUF_STRING(fp, result->pw_dir);
    READ_BUF_STRING(fp, result->pw_shell);
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
    /* set the user access class to an empty string */
    result->pw_class = result->pw_name + strlen(result->pw_name);
#endif /* HAVE_STRUCT_PASSWD_PW_CLASS */
    return NSS_STATUS_SUCCESS;
}
/* read a passwd entry from the stream */
read a passwd entry from the stream
read a passwd entry from the stream
static nss_status_t read_passwd(TFILE* fp, struct passwd* result, char* buffer,
                                size_t buflen, int* errnop)
{
    int32_t tmpint32;
    size_t bufptr = 0;
    memset(result, 0, sizeof(struct passwd));
    READ_BUF_STRING(fp, result->pw_name);
    READ_BUF_STRING(fp, result->pw_passwd);
    READ_INT32(fp, result->pw_uid);
    READ_INT32(fp, result->pw_gid);
    READ_BUF_STRING(fp, result->pw_gecos);
    READ_BUF_STRING(fp, result->pw_dir);
    READ_BUF_STRING(fp, result->pw_shell);
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
    result->pw_class = result->pw_name + strlen(result->pw_name);
#endif 
    return NSS_STATUS_SUCCESS;
}
static nss_status_t read_passwd ( TFILE * fp , struct passwd * result , char * buffer , size_t buflen , int * errnop ) { int32_t tmpint32 ; size_t bufptr = 0 ; memset ( result , 0 , sizeof ( struct passwd ) ) ; READ_BUF_STRING ( fp , result -> pw_name ) ; READ_BUF_STRING ( fp , result -> pw_passwd ) ; READ_INT32 ( fp , result -> pw_uid ) ; READ_INT32 ( fp , result -> pw_gid ) ; READ_BUF_STRING ( fp , result -> pw_gecos ) ; READ_BUF_STRING ( fp , result -> pw_dir ) ; READ_BUF_STRING ( fp , result -> pw_shell ) ; #ifdef HAVE_STRUCT_PASSWD_PW_CLASS result -> pw_class = result -> pw_name + strlen ( result -> pw_name ) ; #endif return NSS_STATUS_SUCCESS ; }
read a passwd entry from the stream
read a passwd entry from the stream
/* set the user access class to an empty string */ /* HAVE_STRUCT_PASSWD_PW_CLASS */