Lines Matching refs:pwd
78 static struct passwd pwd;
85 status = _nss_getpwent_r(&pwd, buf, sizeof(buf), &nss_errno);
93 return &pwd;
102 static struct passwd pwd;
109 status = _nss_getpwnam_r(name, &pwd, buf, sizeof(buf), &nss_errno);
117 return &pwd;
126 static struct passwd pwd;
133 status = _nss_getpwuid_r(uid, &pwd, buf, sizeof(buf), &nss_errno);
141 return &pwd;
340 static void print_passwd(struct passwd *pwd)
343 pwd->pw_name,
344 pwd->pw_passwd,
345 (unsigned long)pwd->pw_uid,
346 (unsigned long)pwd->pw_gid,
347 pwd->pw_gecos,
348 pwd->pw_dir,
349 pwd->pw_shell);
397 struct passwd *pwd;
401 while ((pwd = nss_getpwent())) {
402 printf("Testing user %s\n", pwd->pw_name);
403 printf("getpwent: "); print_passwd(pwd);
404 pwd = nss_getpwuid(pwd->pw_uid);
405 if (!pwd) {
410 printf("getpwuid: "); print_passwd(pwd);
411 pwd = nss_getpwnam(pwd->pw_name);
412 if (!pwd) {
417 printf("getpwnam: "); print_passwd(pwd);
418 printf("initgroups: "); nss_test_initgroups(pwd->pw_name, pwd->pw_gid);
454 struct passwd *pwd;
457 pwd = getpwnam("nosuchname");
458 if (pwd || last_error != NSS_STATUS_NOTFOUND) {
463 pwd = getpwuid(0xFFF0);
464 if (pwd || last_error != NSS_STATUS_NOTFOUND) {