Lines Matching refs:pwd
36 static void check_passwd(const passwd* pwd, const char* username, uid_t uid, uid_type_t uid_type) { in check_passwd() argument
37 ASSERT_TRUE(pwd != NULL); in check_passwd()
38 ASSERT_STREQ(username, pwd->pw_name); in check_passwd()
39 ASSERT_EQ(uid, pwd->pw_uid); in check_passwd()
40 ASSERT_EQ(uid, pwd->pw_gid); in check_passwd()
41 ASSERT_EQ(NULL, pwd->pw_passwd); in check_passwd()
43 ASSERT_EQ(NULL, pwd->pw_gecos); in check_passwd()
47 ASSERT_STREQ("/", pwd->pw_dir); in check_passwd()
49 ASSERT_STREQ("/data", pwd->pw_dir); in check_passwd()
51 ASSERT_STREQ("/system/bin/sh", pwd->pw_shell); in check_passwd()
56 passwd* pwd = getpwuid(uid); in check_getpwuid() local
59 check_passwd(pwd, username, uid, uid_type); in check_getpwuid()
64 passwd* pwd = getpwnam(username); in check_getpwnam() local
67 check_passwd(pwd, username, uid, uid_type); in check_getpwnam()
76 passwd* pwd = NULL; in check_getpwuid_r() local
77 result = getpwuid_r(uid, &pwd_storage, buf, sizeof(buf), &pwd); in check_getpwuid_r()
81 check_passwd(pwd, username, uid, uid_type); in check_getpwuid_r()
90 passwd* pwd = NULL; in check_getpwnam_r() local
91 result = getpwnam_r(username, &pwd_storage, buf, sizeof(buf), &pwd); in check_getpwnam_r()
95 check_passwd(pwd, username, uid, uid_type); in check_getpwnam_r()