Lines Matching refs:uid

79     void store_sid(uint32_t uid, uint64_t sid) {  in store_sid()  argument
81 snprintf(filename, sizeof(filename), "%u", uid); in store_sid()
120 void maybe_store_sid(uint32_t uid, uint64_t sid) { in maybe_store_sid() argument
122 snprintf(filename, sizeof(filename), "%u", uid); in maybe_store_sid()
124 store_sid(uid, sid); in maybe_store_sid()
128 uint64_t read_sid(uint32_t uid) { in read_sid() argument
131 snprintf(filename, sizeof(filename), "%u", uid); in read_sid()
139 void clear_sid(uint32_t uid) { in clear_sid() argument
141 snprintf(filename, sizeof(filename), "%u", uid); in clear_sid()
144 store_sid(uid, 0); in clear_sid()
150 uint32_t adjust_uid(uint32_t uid) { in adjust_uid() argument
152 CHECK(uid < kGsiOffset); in adjust_uid()
155 return uid + kGsiOffset; in adjust_uid()
157 return uid; in adjust_uid()
162 Status enroll(int32_t uid, const std::optional<std::vector<uint8_t>>& currentPasswordHandle, in enroll() argument
201 uint32_t hw_uid = adjust_uid(uid); in enroll()
228 store_sid(uid, handle->user_id); in enroll()
233 auto status = verify(uid, gkResponse->payload(), desiredPassword, &verifyResponse); in enroll()
242 Status verify(int32_t uid, const ::std::vector<uint8_t>& enrolledPasswordHandle, in verify() argument
244 return verifyChallenge(uid, 0 /* challenge */, enrolledPasswordHandle, providedPassword, in verify()
248 Status verifyChallenge(int32_t uid, int64_t challenge, in verifyChallenge() argument
272 uint32_t hw_uid = adjust_uid(uid); in verifyChallenge()
318 maybe_store_sid(uid, handle->user_id); in verifyChallenge()
324 Status getSecureUserId(int32_t uid, int64_t* sid) override { in getSecureUserId() argument
325 *sid = read_sid(uid); in getSecureUserId()
329 Status clearSecureUserId(int32_t uid) override { in clearSecureUserId() argument
337 clear_sid(uid); in clearSecureUserId()
340 uint32_t hw_uid = adjust_uid(uid); in clearSecureUserId()
362 const int uid = ipc->getCallingUid(); in dump() local
363 if (!PermissionCache::checkPermission(DUMP_PERMISSION, pid, uid)) { in dump()