Home
last modified time | relevance | path

Searched refs:user_id (Results 1 – 25 of 58) sorted by relevance

123

/system/vold/
DFsCrypt.cpp134 static std::string get_de_key_path(userid_t user_id) { in get_de_key_path() argument
135 return StringPrintf("%s/de/%d", user_key_dir.c_str(), user_id); in get_de_key_path()
138 static std::string get_ce_key_directory_path(userid_t user_id) { in get_ce_key_directory_path() argument
139 return StringPrintf("%s/ce/%d", user_key_dir.c_str(), user_id); in get_ce_key_directory_path()
212 static bool read_and_fixate_user_ce_key(userid_t user_id, in read_and_fixate_user_ce_key() argument
215 auto const directory_path = get_ce_key_directory_path(user_id); in read_and_fixate_user_ce_key()
226 LOG(ERROR) << "Failed to find working ce key for user " << user_id; in read_and_fixate_user_ce_key()
319 static bool read_and_install_user_ce_key(userid_t user_id, in read_and_install_user_ce_key() argument
321 if (s_ce_policies.count(user_id) != 0) return true; in read_and_install_user_ce_key()
323 if (!read_and_fixate_user_ce_key(user_id, auth, &ce_key)) return false; in read_and_install_user_ce_key()
[all …]
Dvold_prepare_subdirs.cpp58 const std::string& path, uid_t user_id) { in prepare_dir_for_user() argument
65 if (user_id != (uid_t)-1) { in prepare_dir_for_user()
66 if (selinux_android_context_with_level(secontext.get(), &tmp_secontext, user_id, in prepare_dir_for_user()
169 static bool prepare_subdirs(const std::string& volume_uuid, int user_id, int flags) { in prepare_subdirs() argument
177 auto user_de_path = android::vold::BuildDataUserDePath(volume_uuid, user_id); in prepare_subdirs()
178 if (!prepare_dir_for_user(sehandle, 0771, AID_SYSTEM, AID_SYSTEM, user_de_path, user_id)) { in prepare_subdirs()
182 auto misc_de_path = android::vold::BuildDataMiscDePath(volume_uuid, user_id); in prepare_subdirs()
184 misc_de_path + "/sdksandbox", user_id)) { in prepare_subdirs()
196 auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id); in prepare_subdirs()
198 user_id)) { in prepare_subdirs()
[all …]
DFsCrypt.h26 bool fscrypt_vold_create_user_key(userid_t user_id, int serial, bool ephemeral);
27 bool fscrypt_destroy_user_key(userid_t user_id);
28 bool fscrypt_set_user_key_protection(userid_t user_id, const std::string& secret);
32 bool fscrypt_unlock_user_key(userid_t user_id, int serial, const std::string& secret);
33 bool fscrypt_lock_user_key(userid_t user_id);
35 bool fscrypt_prepare_user_storage(const std::string& volume_uuid, userid_t user_id, int serial,
37 bool fscrypt_destroy_user_storage(const std::string& volume_uuid, userid_t user_id, int flags);
/system/gatekeeper/
Dgatekeeper.cpp47 secure_id_t user_id = 0;// todo: rename to policy in Enroll() local
48 uint32_t uid = request.user_id; in Enroll()
52 GetRandom(&user_id, sizeof(secure_id_t)); in Enroll()
61 user_id = pw_handle->user_id; in Enroll()
70 if (!GetFailureRecord(uid, user_id, &record, throttle_secure)) { in Enroll()
77 if (!IncrementFailureRecord(uid, user_id, timestamp, &record, throttle_secure)) { in Enroll()
97 if (ClearFailureRecord(uid, user_id, true)) { in Enroll()
100 ClearFailureRecord(uid, user_id, false); in Enroll()
108 salt, user_id, flags, HANDLE_VERSION, request.provided_password)) { in Enroll()
131 secure_id_t user_id = password_handle->user_id; in Verify() local
[all …]
Dgatekeeper_messages.cpp30 uint32_t user_id; member
119 header->user_id = user_id; in Serialize()
139 user_id = header->user_id; in Deserialize()
161 VerifyRequest::VerifyRequest(uint32_t user_id, uint64_t challenge, in VerifyRequest() argument
163 this->user_id = user_id; in VerifyRequest()
199 VerifyResponse::VerifyResponse(uint32_t user_id, SizedBuffer auth_token) { in VerifyResponse() argument
200 this->user_id = user_id; in VerifyResponse()
236 EnrollRequest::EnrollRequest(uint32_t user_id, SizedBuffer password_handle, in EnrollRequest() argument
238 this->user_id = user_id; in EnrollRequest()
276 EnrollResponse::EnrollResponse(uint32_t user_id, SizedBuffer enrolled_password_handle) { in EnrollResponse() argument
[all …]
/system/core/libcutils/
Dmultiuser.cpp28 uid_t multiuser_get_uid(userid_t user_id, appid_t app_id) { in multiuser_get_uid() argument
29 return (user_id * AID_USER_OFFSET) + (app_id % AID_USER_OFFSET); in multiuser_get_uid()
32 uid_t multiuser_get_sdk_sandbox_uid(userid_t user_id, appid_t app_id) { in multiuser_get_sdk_sandbox_uid() argument
35 return (user_id * AID_USER_OFFSET) + (app_id % AID_USER_OFFSET) + sdk_sandbox_offset; in multiuser_get_sdk_sandbox_uid()
51 gid_t multiuser_get_cache_gid(userid_t user_id, appid_t app_id) { in multiuser_get_cache_gid() argument
53 return multiuser_get_uid(user_id, (app_id - AID_APP_START) + AID_CACHE_GID_START); in multiuser_get_cache_gid()
59 gid_t multiuser_get_ext_gid(userid_t user_id, appid_t app_id) { in multiuser_get_ext_gid() argument
61 return multiuser_get_uid(user_id, (app_id - AID_APP_START) + AID_EXT_GID_START); in multiuser_get_ext_gid()
67 gid_t multiuser_get_ext_cache_gid(userid_t user_id, appid_t app_id) { in multiuser_get_ext_cache_gid() argument
69 return multiuser_get_uid(user_id, (app_id - AID_APP_START) + AID_EXT_CACHE_GID_START); in multiuser_get_ext_cache_gid()
/system/core/libcutils/include/cutils/
Dmultiuser.h32 extern uid_t multiuser_get_uid(userid_t user_id, appid_t app_id);
33 extern uid_t multiuser_get_sdk_sandbox_uid(userid_t user_id, appid_t app_id);
36 extern gid_t multiuser_get_cache_gid(userid_t user_id, appid_t app_id);
37 extern gid_t multiuser_get_ext_gid(userid_t user_id, appid_t app_id);
38 extern gid_t multiuser_get_ext_cache_gid(userid_t user_id, appid_t app_id);
39 extern gid_t multiuser_get_shared_gid(userid_t user_id, appid_t app_id);
/system/core/libcutils/include_outside_system/cutils/
Dmultiuser.h32 extern uid_t multiuser_get_uid(userid_t user_id, appid_t app_id);
33 extern uid_t multiuser_get_sdk_sandbox_uid(userid_t user_id, appid_t app_id);
36 extern gid_t multiuser_get_cache_gid(userid_t user_id, appid_t app_id);
37 extern gid_t multiuser_get_ext_gid(userid_t user_id, appid_t app_id);
38 extern gid_t multiuser_get_ext_cache_gid(userid_t user_id, appid_t app_id);
39 extern gid_t multiuser_get_shared_gid(userid_t user_id, appid_t app_id);
/system/core/storaged/
Dstoraged.cpp219 void storaged_t::add_user_ce(userid_t user_id) { in add_user_ce() argument
222 if (!proto_loaded[user_id]) { in add_user_ce()
223 load_proto(user_id); in add_user_ce()
224 proto_loaded[user_id] = true; in add_user_ce()
228 void storaged_t::remove_user_ce(userid_t user_id) { in remove_user_ce() argument
231 proto_loaded[user_id] = false; in remove_user_ce()
232 mUidm.clear_user_history(user_id); in remove_user_ce()
233 RemoveFileIfExists(proto_path(user_id), nullptr); in remove_user_ce()
236 void storaged_t::load_proto(userid_t user_id) { in load_proto() argument
237 string proto_file = proto_path(user_id); in load_proto()
[all …]
Dstoraged_uid_monitor.cpp226 record.ios.user_id = p.second.user_id; in add_records_locked()
318 usage.user_id = multiuser_get_user_id(uid.uid); in update_curr_io_stats_locked()
416 userid_t user_id = entry.ios.user_id; in update_uid_io_proto() local
417 UidIOItem* item_proto = user_items[user_id]; in update_uid_io_proto()
419 item_proto = (*protos)[user_id].mutable_uid_io_usage() in update_uid_io_proto()
421 user_items[user_id] = item_proto; in update_uid_io_proto()
430 rec_proto->set_user_id(user_id); in update_uid_io_proto()
448 void uid_monitor::clear_user_history(userid_t user_id) in clear_user_history() argument
456 [user_id](const uid_record& rec) { in clear_user_history()
457 return rec.ios.user_id == user_id;}), in clear_user_history()
[all …]
/system/security/keystore2/src/
Dmaintenance.rs53 fn delete_user(&self, user_id: u32) -> Result<()>; in delete_user()
72 fn on_user_password_changed(user_id: i32, password: Option<Password>) -> Result<()> { in on_user_password_changed()
81 skm.unlock_screen_lock_bound_key(&mut db.borrow_mut(), user_id as u32, pw) in on_user_password_changed()
91 user_id as u32, in on_user_password_changed()
108 fn add_or_remove_user(&self, user_id: i32) -> Result<()> { in add_or_remove_user()
117 user_id as u32, in add_or_remove_user()
123 .delete_user(user_id as u32) in add_or_remove_user()
141 fn get_state(user_id: i32) -> Result<AidlUserState> { in get_state()
150 user_id as u32, in get_state()
243 let user_id = uid_to_android_user(calling_uid); in migrate_key_namespace() localVariable
[all …]
Dsuper_key.rs393 user_id: UserId, in get_per_boot_key_by_user_id()
395 self.get_per_boot_key_by_user_id_internal(user_id) in get_per_boot_key_by_user_id()
399 fn get_per_boot_key_by_user_id_internal(&self, user_id: UserId) -> Option<Arc<SuperKey>> { in get_per_boot_key_by_user_id_internal()
400 self.data.user_keys.get(&user_id).and_then(|e| e.per_boot.as_ref().cloned()) in get_per_boot_key_by_user_id_internal()
516 user_id: UserId, in super_key_exists_in_db_for_user()
519 .key_exists(Domain::APP, user_id as u64 as i64, USER_SUPER_KEY.alias, KeyType::Super) in super_key_exists_in_db_for_user()
525 legacy_importer.has_super_key(user_id).context(ks_err!("Trying to query legacy db.")) in super_key_exists_in_db_for_user()
536 user_id: UserId, in check_and_unlock_super_key()
541 .with_try_import_super_key(user_id, pw, || db.load_super_key(alias, user_id)) in check_and_unlock_super_key()
547 .populate_cache_from_super_key_blob(user_id, alias.algorithm, entry, pw) in check_and_unlock_super_key()
[all …]
Dauthorization.rs139 user_id: i32, in on_lock_screen_event()
146 user_id, in on_lock_screen_event()
156 ENFORCEMENTS.set_device_locked(user_id, false); in on_lock_screen_event()
163 user_id as u32, in on_lock_screen_event()
175 user_id as u32, in on_lock_screen_event()
190 ENFORCEMENTS.set_device_locked(user_id, false); in on_lock_screen_event()
193 skm.try_unlock_user_with_biometric(&mut db.borrow_mut(), user_id as u32) in on_lock_screen_event()
200 ENFORCEMENTS.set_device_locked(user_id, true); in on_lock_screen_event()
205 user_id as u32, in on_lock_screen_event()
251 user_id: i32, in onLockScreenEvent()
[all …]
Dlegacy_importer.rs346 user_id: u32, in with_try_import_super_key()
362 importer_state.check_and_import_super_key(user_id, &pw) in with_try_import_super_key()
397 user_id: u32, in bulk_delete_user()
404 .bulk_delete(BulkDeleteRequest::User(user_id), keep_non_super_encrypted_keys) in bulk_delete_user()
411 pub fn has_super_key(&self, user_id: u32) -> Result<bool> { in has_super_key()
413 self.do_serialized(move |importer_state| importer_state.has_super_key(user_id)); in has_super_key()
444 let user_id = uid_to_android_user(uid); in get_super_key_id_check_unlockable_or_delete() localVariable
448 .load_super_key(&USER_SUPER_KEY, user_id) in get_super_key_id_check_unlockable_or_delete()
462 if self.legacy_loader.has_super_key(user_id) { in get_super_key_id_check_unlockable_or_delete()
710 fn check_and_import_super_key(&mut self, user_id: u32, pw: &Password) -> Result<()> { in check_and_import_super_key()
[all …]
Dlegacy_blob.rs843 let user_id = uid_to_android_user(uid); in remove_legacy_keystore_entry() localVariable
844 self.remove_user_dir_if_empty(user_id) in remove_legacy_keystore_entry()
852 let user_id = uid_to_android_user(uid); in list_legacy_keystore_entries_for_uid() localVariable
853 path.push(format!("user_{}", user_id)); in list_legacy_keystore_entries_for_uid()
894 user_id: u32, in list_legacy_keystore_entries_for_user()
896 let user_entries = self.list_user(user_id).context(ks_err!("Trying to list user."))?; in list_legacy_keystore_entries_for_user()
926 let user_id = uid_to_android_user(uid); in make_legacy_keystore_entry_filename() localVariable
928 path.push(format!("user_{}", user_id)); in make_legacy_keystore_entry_filename()
936 let user_id = uid_to_android_user(uid); in make_blob_filename() localVariable
938 let mut path = self.make_user_path_name(user_id); in make_blob_filename()
[all …]
/system/core/storaged/include/
Dstoraged.h112 void load_proto(userid_t user_id);
113 char* prepare_proto(userid_t user_id, StoragedProto* proto);
114 void flush_proto(userid_t user_id, StoragedProto* proto);
115 void flush_proto_data(userid_t user_id, const char* data, ssize_t size);
116 string proto_path(userid_t user_id) { in proto_path() argument
117 return string("/data/misc_ce/") + to_string(user_id) + in proto_path()
156 void add_user_ce(userid_t user_id);
157 void remove_user_ce(userid_t user_id);
Dstoraged_uid_monitor.h63 userid_t user_id; member
127 void load_uid_io_proto(userid_t user_id, const UidIOUsage& proto);
128 void clear_user_history(userid_t user_id);
/system/apex/apexd/aidl/android/apex/
DIApexService.aidl43 void snapshotCeData(int user_id, int rollback_id, in @utf8InCpp String apex_name); in snapshotCeData() argument
49 void restoreCeData(int user_id, int rollback_id, in @utf8InCpp String apex_name); in restoreCeData() argument
59 void destroyCeSnapshots(int user_id, int rollback_id); in destroyCeSnapshots() argument
65 void destroyCeSnapshotsNotSpecified(int user_id, in int[] retain_rollback_ids); in destroyCeSnapshotsNotSpecified() argument
/system/core/storaged/tests/
Dstoraged_test.cpp465 .user_id = 0, in TEST()
470 .user_id = 0, in TEST()
475 .user_id = 1, in TEST()
487 .user_id = 1, in TEST()
492 .user_id = 0, in TEST()
513 EXPECT_EQ(user_0_item_0.records().entries(0).user_id(), 0UL); in TEST()
516 EXPECT_EQ(user_0_item_0.records().entries(1).user_id(), 0UL); in TEST()
523 EXPECT_EQ(user_0_item_1.records().entries(0).user_id(), 0UL); in TEST()
532 EXPECT_EQ(user_1_item_0.records().entries(0).user_id(), 1UL); in TEST()
540 EXPECT_EQ(user_1_item_1.records().entries(0).user_id(), 1UL); in TEST()
[all …]
/system/extras/simpleperf/simpleperf_app_runner/
Dsimpleperf_app_runner.cpp180 uint32_t user_id = 0; in main() local
182 if (!ParseUint(argv[i + 1], &user_id)) { in main()
227 if (user_id > 0) { in main()
229 if ((UID_MAX - info->uid) / AID_USER_OFFSET < user_id) { in main()
230 error(1, 0, "user id is too big: %d", user_id); in main()
232 user_app_id = (AID_USER_OFFSET * user_id) + info->uid; in main()
233 data_dir = StringPrintf("/data/user/%d/%s", user_id, pkgname); in main()
/system/gatekeeper/include/gatekeeper/
Dgatekeeper_messages.h165 uint32_t user_id; member
171 uint32_t user_id,
187 VerifyResponse(uint32_t user_id, SizedBuffer auth_token);
201 EnrollRequest(uint32_t user_id, SizedBuffer password_handle,
226 EnrollResponse(uint32_t user_id, SizedBuffer enrolled_password_handle);
239 DeleteUserRequest(uint32_t user_id);
Dgatekeeper.h144 virtual bool GetFailureRecord(uint32_t uid, secure_id_t user_id, failure_record_t *record,
157 virtual bool ClearFailureRecord(uint32_t uid, secure_id_t user_id, bool secure) = 0;
196 secure_id_t user_id, secure_id_t authenticator_id, uint64_t challenge);
212 bool IncrementFailureRecord(uint32_t uid, secure_id_t user_id, uint64_t timestamp,
/system/librustutils/
Dusers.rs34 pub fn multiuser_get_uid(user_id: u32, app_id: u32) -> u32 { in multiuser_get_uid()
35 (user_id * AID_USER_OFFSET) + (app_id % AID_USER_OFFSET) in multiuser_get_uid()
/system/keymaster/tests/
Dkeymaster_enforcement_test.cpp587 token.user_id = 9; in TEST_F()
593 .Authorization(TAG_USER_SECURE_ID, token.user_id) in TEST_F()
610 token.user_id = 9; in TEST_F()
617 .Authorization(TAG_USER_SECURE_ID, token.user_id) in TEST_F()
639 token.user_id = 9; in TEST_F()
645 .Authorization(TAG_USER_SECURE_ID, token.user_id) in TEST_F()
663 token.user_id = 9; in TEST_F()
670 .Authorization(TAG_USER_SECURE_ID, token.user_id) in TEST_F()
690 token.user_id = 9; in TEST_F()
698 .Authorization(TAG_USER_SECURE_ID, token.user_id) in TEST_F()
[all …]
/system/extras/simpleperf/
Denvironment.cpp544 bool IsAppDebuggable(int user_id, const std::string& package_name) { in IsAppDebuggable() argument
545 return Workload::RunCmd({"run-as", package_name, "--user", std::to_string(user_id), "echo", in IsAppDebuggable()
552 InAppRunner(int user_id, const std::string& package_name) in InAppRunner() argument
553 : user_id_(std::to_string(user_id)), package_name_(package_name) {} in InAppRunner()
679 RunAs(int user_id, const std::string& package_name) : InAppRunner(user_id, package_name) {} in RunAs() argument
733 SimpleperfAppRunner(int user_id, const std::string& package_name, const std::string& app_type) in SimpleperfAppRunner() argument
734 : InAppRunner(user_id, package_name) { in SimpleperfAppRunner()
774 int user_id; in GetCurrentUserId() local
775 if (android::base::ParseInt(android::base::Trim(buf), &user_id, 0)) { in GetCurrentUserId()
776 return user_id; in GetCurrentUserId()
[all …]

123