Lines Matching refs:username
59 static void check_passwd(const passwd* pwd, const char* username, uid_t uid, uid_type_t uid_type, in check_passwd() argument
63 EXPECT_STREQ(username, pwd->pw_name); in check_passwd()
85 static void check_getpwuid(const char* username, uid_t uid, uid_type_t uid_type, in check_getpwuid() argument
91 check_passwd(pwd, username, uid, uid_type, check_username); in check_getpwuid()
94 static void check_getpwnam(const char* username, uid_t uid, uid_type_t uid_type, in check_getpwnam() argument
97 passwd* pwd = getpwnam(username); in check_getpwnam()
100 check_passwd(pwd, username, uid, uid_type, check_username); in check_getpwnam()
103 static void check_getpwuid_r(const char* username, uid_t uid, uid_type_t uid_type, in check_getpwuid_r() argument
115 check_passwd(pwd, username, uid, uid_type, check_username); in check_getpwuid_r()
118 static void check_getpwnam_r(const char* username, uid_t uid, uid_type_t uid_type, in check_getpwnam_r() argument
126 result = getpwnam_r(username, &pwd_storage, buf, sizeof(buf), &pwd); in check_getpwnam_r()
130 check_passwd(pwd, username, uid, uid_type, check_username); in check_getpwnam_r()
133 static void check_get_passwd(const char* username, uid_t uid, uid_type_t uid_type, in check_get_passwd() argument
135 SCOPED_TRACE("username '"s + username + "'"); in check_get_passwd()
136 check_getpwuid(username, uid, uid_type, check_username); in check_get_passwd()
137 check_getpwnam(username, uid, uid_type, check_username); in check_get_passwd()
138 check_getpwuid_r(username, uid, uid_type, check_username); in check_get_passwd()
139 check_getpwnam_r(username, uid, uid_type, check_username); in check_get_passwd()
156 static void expect_no_passwd_name(const char* username) { in expect_no_passwd_name() argument
157 SCOPED_TRACE("username '"s + username + "'"); in expect_no_passwd_name()
160 passwd = getpwnam(username); in expect_no_passwd_name()
166 EXPECT_EQ(ENOENT, getpwnam_r(username, &passwd_storage, buf, sizeof(buf), &passwd)); in expect_no_passwd_name()