Lines Matching refs:uid

59 static void check_passwd(const passwd* pwd, const char* username, uid_t uid, uid_type_t uid_type,  in check_passwd()  argument
65 EXPECT_EQ(uid, pwd->pw_uid); in check_passwd()
66 EXPECT_EQ(uid, pwd->pw_gid); in check_passwd()
85 static void check_getpwuid(const char* username, uid_t uid, uid_type_t uid_type, in check_getpwuid() argument
88 passwd* pwd = getpwuid(uid); in check_getpwuid()
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
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
111 result = getpwuid_r(uid, &pwd_storage, buf, sizeof(buf), &pwd); in check_getpwuid_r()
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
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
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()
142 static void expect_no_passwd_id(uid_t uid) { in expect_no_passwd_id() argument
143 SCOPED_TRACE("uid '" + std::to_string(uid) + "'"); in expect_no_passwd_id()
146 passwd = getpwuid(uid); in expect_no_passwd_id()
152 EXPECT_EQ(ENOENT, getpwuid_r(uid, &passwd_storage, buf, sizeof(buf), &passwd)); in expect_no_passwd_id()