Home
last modified time | relevance | path

Searched refs:userId (Results 1 – 25 of 29) sorted by relevance

12

/system/vold/binder/android/os/
DIVold.aidl31 void onUserAdded(int userId, int userSerial); in onUserAdded() argument
32 void onUserRemoved(int userId); in onUserRemoved() argument
33 void onUserStarted(int userId); in onUserStarted() argument
34 void onUserStopped(int userId); in onUserStopped() argument
87 void createUserKey(int userId, int userSerial, boolean ephemeral); in createUserKey() argument
88 void destroyUserKey(int userId); in destroyUserKey() argument
90 void addUserKeyAuth(int userId, int userSerial, @utf8InCpp String token, in addUserKeyAuth() argument
92 void clearUserKeyAuth(int userId, int userSerial, @utf8InCpp String token, in clearUserKeyAuth() argument
94 void fixateNewestUserKeyAuth(int userId); in fixateNewestUserKeyAuth() argument
96 void unlockUserKey(int userId, int userSerial, @utf8InCpp String token, in unlockUserKey() argument
[all …]
/system/security/keystore/
Dkeystore_keymaster_enforcement.h88 bool is_device_locked(int32_t userId) const override { in is_device_locked() argument
90 if (mIsDeviceLockedForUser.count(userId) == 0) return true; in is_device_locked()
91 return mIsDeviceLockedForUser.find(userId)->second; in is_device_locked()
94 void set_device_locked(bool isLocked, int32_t userId) { in set_device_locked() argument
95 mIsDeviceLockedForUser[userId] = isLocked; in set_device_locked()
Duser_state.cpp38 UserState::UserState(uid_t userId) in UserState() argument
39 : mMasterKeyEntry(".masterkey", "user_" + std::to_string(userId), userId, /* masterkey */ true), in UserState()
40 mUserId(userId), mState(STATE_UNINITIALIZED) {} in UserState()
46 bool UserState::operator<(uid_t userId) const { in operator <()
47 return getUserId() < userId; in operator <()
50 bool operator<(uid_t userId, const UserState& rhs) { in operator <() argument
51 return userId < rhs.getUserId(); in operator <()
279 LockedUserState<UserState> UserStateDB::getUserState(uid_t userId) { in getUserState() argument
283 std::tie(it, inserted) = mMasterKeys.emplace(userId, userId); in getUserState()
290 ALOGE("User initialization failed for %u; subsequent operations will fail", userId); in getUserState()
[all …]
DKeyStore.h102 State getState(uid_t userId) { return mUserStateDB.getUserState(userId)->getState(); }
104 ResponseCode initializeUser(const android::String8& pw, uid_t userId);
107 ResponseCode writeMasterKey(const android::String8& pw, uid_t userId);
108 ResponseCode readMasterKey(const android::String8& pw, uid_t userId);
118 void resetUser(uid_t userId, bool keepUnenryptedEntries);
119 bool isEmpty(uid_t userId) const;
121 void lock(uid_t userId);
132 uid_t userId, int32_t flags);
DKeyStore.cpp81 ResponseCode KeyStore::initializeUser(const android::String8& pw, uid_t userId) { in initializeUser() argument
82 auto userState = mUserStateDB.getUserState(userId); in initializeUser()
92 ResponseCode KeyStore::writeMasterKey(const android::String8& pw, uid_t userId) { in writeMasterKey() argument
93 auto userState = mUserStateDB.getUserState(userId); in writeMasterKey()
97 ResponseCode KeyStore::readMasterKey(const android::String8& pw, uid_t userId) { in readMasterKey() argument
98 auto userState = mUserStateDB.getUserState(userId); in readMasterKey()
136 void KeyStore::resetUser(uid_t userId, bool keepUnenryptedEntries) { in resetUser() argument
140 auto userState = mUserStateDB.getUserState(userId); in resetUser()
197 userState = mUserStateDB.getUserState(userId); in resetUser()
199 ALOGE("Failed to delete user %d's master key", userId); in resetUser()
[all …]
Duser_state.h46 explicit UserState(uid_t userId);
73 bool operator<(uid_t userId) const;
99 bool operator<(uid_t userId, const UserState& rhs);
103 LockedUserState<UserState> getUserState(uid_t userId);
105 LockedUserState<const UserState> getUserState(uid_t userId) const;
Dkey_store_service.cpp147 Status KeyStoreService::getState(int32_t userId, int32_t* aidl_return) { in getState() argument
152 *aidl_return = mKeyStore->getState(userId); in getState()
285 const int32_t userId = get_user_id(callingUid); in listUidsOfAuthBoundKeys() local
294 auto userState = mKeyStore->getUserStateDB().getUserState(userId); in listUidsOfAuthBoundKeys()
309 ALOGE("Error listing blob entries for user %d", userId); in listUidsOfAuthBoundKeys()
346 Status KeyStoreService::onUserPasswordChanged(int32_t userId, const String16& password, in onUserPasswordChanged() argument
354 ALOGI("Secure lockscreen for user %d removed, deleting encrypted entries", userId); in onUserPasswordChanged()
355 mKeyStore->resetUser(userId, true); in onUserPasswordChanged()
360 switch (mKeyStore->getState(userId)) { in onUserPasswordChanged()
364 *aidl_return = static_cast<int32_t>(mKeyStore->initializeUser(password8, userId)); in onUserPasswordChanged()
[all …]
Dkey_store_service.h54 ::android::binder::Status getState(int32_t userId, int32_t* _aidl_return) override;
69 ::android::binder::Status onUserPasswordChanged(int32_t userId,
72 ::android::binder::Status lock(int32_t userId, int32_t* _aidl_return) override;
73 ::android::binder::Status unlock(int32_t userId, const ::android::String16& userPassword,
75 ::android::binder::Status isEmpty(int32_t userId, int32_t* _aidl_return) override;
138 ::android::binder::Status onUserAdded(int32_t userId, int32_t parentId,
140 ::android::binder::Status onUserRemoved(int32_t userId, int32_t* _aidl_return) override;
168 ::android::binder::Status onKeyguardVisibilityChanged(bool isShowing, int32_t userId,
Dkeymaster_enforcement.h194 virtual bool is_device_locked(int32_t userId) const = 0;
Dauth_token_table.h144 return (sid == token_.userId || sid == token_.authenticatorId) && in SatisfiesAuth()
Dauth_token_table.cpp293 return (token_.userId == entry.token_.userId && in Supersedes()
/system/core/run-as/
Drun-as.cpp186 int userId = 0; in main() local
188 userId = atoi(argv[3]); in main()
189 if (userId < 0) error(1, 0, "negative user id: %d", userId); in main()
204 if (userId > 0) { in main()
206 if (asprintf(&info.data_dir, "/data/user/%d/%s", userId, pkgname) == -1) { in main()
217 if ((UID_MAX - info.uid) / AID_USER_OFFSET < (uid_t)userId) { in main()
218 error(1, 0, "user id too big: %d", userId); in main()
222 uid_t userAppId = (AID_USER_OFFSET * userId) + info.uid; in main()
/system/vold/
DVoldNativeService.h40 binder::Status onUserAdded(int32_t userId, int32_t userSerial);
41 binder::Status onUserRemoved(int32_t userId);
42 binder::Status onUserStarted(int32_t userId);
43 binder::Status onUserStopped(int32_t userId);
109 binder::Status createUserKey(int32_t userId, int32_t userSerial, bool ephemeral);
110 binder::Status destroyUserKey(int32_t userId);
112 binder::Status addUserKeyAuth(int32_t userId, int32_t userSerial, const std::string& token,
114 binder::Status clearUserKeyAuth(int32_t userId, int32_t userSerial, const std::string& token,
116 binder::Status fixateNewestUserKeyAuth(int32_t userId);
118 binder::Status unlockUserKey(int32_t userId, int32_t userSerial, const std::string& token,
[all …]
DVoldNativeService.cpp178 binder::Status VoldNativeService::onUserAdded(int32_t userId, int32_t userSerial) { in onUserAdded() argument
182 return translate(VolumeManager::Instance()->onUserAdded(userId, userSerial)); in onUserAdded()
185 binder::Status VoldNativeService::onUserRemoved(int32_t userId) { in onUserRemoved() argument
189 return translate(VolumeManager::Instance()->onUserRemoved(userId)); in onUserRemoved()
192 binder::Status VoldNativeService::onUserStarted(int32_t userId) { in onUserStarted() argument
196 return translate(VolumeManager::Instance()->onUserStarted(userId)); in onUserStarted()
199 binder::Status VoldNativeService::onUserStopped(int32_t userId) { in onUserStopped() argument
203 return translate(VolumeManager::Instance()->onUserStopped(userId)); in onUserStopped()
656 binder::Status VoldNativeService::createUserKey(int32_t userId, int32_t userSerial, bool ephemeral)… in createUserKey() argument
660 return translateBool(fscrypt_vold_create_user_key(userId, userSerial, ephemeral)); in createUserKey()
[all …]
DVolumeManager.cpp363 int VolumeManager::linkPrimary(userid_t userId) { in linkPrimary() argument
366 source = StringPrintf("%s/%d", source.c_str(), userId); in linkPrimary()
370 std::string target(StringPrintf("/mnt/user/%d/primary", userId)); in linkPrimary()
376 int VolumeManager::onUserAdded(userid_t userId, int userSerialNumber) { in onUserAdded() argument
377 mAddedUsers[userId] = userSerialNumber; in onUserAdded()
381 int VolumeManager::onUserRemoved(userid_t userId) { in onUserRemoved() argument
382 mAddedUsers.erase(userId); in onUserRemoved()
386 int VolumeManager::onUserStarted(userid_t userId) { in onUserStarted() argument
387 LOG(VERBOSE) << "onUserStarted: " << userId; in onUserStarted()
391 std::string path(StringPrintf("%s/%d", kPathUserMount, userId)); in onUserStarted()
[all …]
DUtils.cpp680 std::string BuildDataSystemLegacyPath(userid_t userId) { in BuildDataSystemLegacyPath() argument
681 return StringPrintf("%s/system/users/%u", BuildDataPath("").c_str(), userId); in BuildDataSystemLegacyPath()
684 std::string BuildDataSystemCePath(userid_t userId) { in BuildDataSystemCePath() argument
685 return StringPrintf("%s/system_ce/%u", BuildDataPath("").c_str(), userId); in BuildDataSystemCePath()
688 std::string BuildDataSystemDePath(userid_t userId) { in BuildDataSystemDePath() argument
689 return StringPrintf("%s/system_de/%u", BuildDataPath("").c_str(), userId); in BuildDataSystemDePath()
692 std::string BuildDataMiscLegacyPath(userid_t userId) { in BuildDataMiscLegacyPath() argument
693 return StringPrintf("%s/misc/user/%u", BuildDataPath("").c_str(), userId); in BuildDataMiscLegacyPath()
696 std::string BuildDataMiscCePath(userid_t userId) { in BuildDataMiscCePath() argument
697 return StringPrintf("%s/misc_ce/%u", BuildDataPath("").c_str(), userId); in BuildDataMiscCePath()
[all …]
DVolumeManager.h89 int onUserAdded(userid_t userId, int userSerialNumber);
90 int onUserRemoved(userid_t userId);
91 int onUserStarted(userid_t userId);
92 int onUserStopped(userid_t userId);
138 int linkPrimary(userid_t userId);
/system/security/keystore/binder/android/security/keystore/
DIKeystoreService.aidl34 int getState(int userId); in getState() argument
45 int onUserPasswordChanged(int userId, String newPassword); in onUserPasswordChanged() argument
46 int lock(int userId); in lock() argument
47 int unlock(int userId, String userPassword); in unlock() argument
48 int isEmpty(int userId); in isEmpty() argument
74 int onUserAdded(int userId, int parentId); in onUserAdded() argument
75 int onUserRemoved(int userId); in onUserRemoved() argument
86 int onKeyguardVisibilityChanged(in boolean isShowing, in int userId); in onKeyguardVisibilityChanged() argument
/system/core/storaged/binder/android/os/
DIStoraged.aidl21 void onUserStarted(int userId); in onUserStarted() argument
22 void onUserStopped(int userId); in onUserStopped() argument
/system/core/storaged/include/
Dstoraged_service.h40 binder::Status onUserStarted(int32_t userId);
41 binder::Status onUserStopped(int32_t userId);
/system/security/keystore/include/keystore/
Dkeystore_hidl_support.h92 static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + in authToken2HidlVec()
103 pos = copy_bytes_to_iterator(token.userId, pos); in authToken2HidlVec()
124 static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + in hidlVec2Km3AuthToken()
135 pos = copy_bytes_from_iterator(&token.userId, pos); in hidlVec2Km3AuthToken()
/system/core/storaged/
Dstoraged_service.cpp167 binder::Status StoragedService::onUserStarted(int32_t userId) { in onUserStarted() argument
168 storaged_sp->add_user_ce(userId); in onUserStarted()
172 binder::Status StoragedService::onUserStopped(int32_t userId) { in onUserStopped() argument
173 storaged_sp->remove_user_ce(userId); in onUserStopped()
/system/keymaster/ng/include/
Dkeystore_hidl_support.h107 static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + in authToken2HidlVec()
118 pos = copy_bytes_to_iterator(token.userId, pos); in authToken2HidlVec()
/system/security/keystore/tests/
Dauth_token_table_test.cpp68 token.userId = rsid; in make_token()
105 EXPECT_EQ(1U, found.userId); in TEST()
111 EXPECT_EQ(1U, found.userId); in TEST()
117 EXPECT_EQ(3U, found.userId); in TEST()
123 EXPECT_EQ(3U, found.userId); in TEST()
/system/security/identity/
DCredential.cpp272 aidlAuthToken.userId = 0; in getEntries()
302 aidlAuthToken.userId = int64_t(authToken.userId); in getEntries()

12