Lines Matching refs:pwd
65 static struct passwd pwd;
69 status = _nss_getpwent_r(&pwd, buf, sizeof(buf), &nss_errno);
77 return &pwd;
84 static struct passwd pwd;
88 status = _nss_getpwnam_r(name, &pwd, buf, sizeof(buf), &nss_errno);
96 return &pwd;
103 static struct passwd pwd;
107 status = _nss_getpwuid_r(uid, &pwd, buf, sizeof(buf), &nss_errno);
115 return &pwd;
257 static void print_passwd(struct passwd *pwd)
260 pwd->pw_name,
261 pwd->pw_passwd,
262 pwd->pw_uid,
263 pwd->pw_gid,
264 pwd->pw_gecos,
265 pwd->pw_dir,
266 pwd->pw_shell);
314 struct passwd *pwd;
318 while ((pwd = nss_getpwent())) {
319 printf("Testing user %s\n", pwd->pw_name);
320 printf("getpwent: "); print_passwd(pwd);
321 pwd = nss_getpwuid(pwd->pw_uid);
322 if (!pwd) {
327 printf("getpwuid: "); print_passwd(pwd);
328 pwd = nss_getpwnam(pwd->pw_name);
329 if (!pwd) {
334 printf("getpwnam: "); print_passwd(pwd);
335 printf("initgroups: "); nss_test_initgroups(pwd->pw_name, pwd->pw_gid);
371 struct passwd *pwd;
374 pwd = getpwnam("nosuchname");
375 if (pwd || last_error != NSS_STATUS_NOTFOUND) {
380 pwd = getpwuid(0xFFF0);
381 if (pwd || last_error != NSS_STATUS_NOTFOUND) {