Lines Matching refs:userId
63 ResponseCode KeyStore::initializeUser(const android::String8& pw, uid_t userId) { in initializeUser() argument
64 UserState* userState = getUserState(userId); in initializeUser()
74 ResponseCode KeyStore::writeMasterKey(const android::String8& pw, uid_t userId) { in writeMasterKey() argument
75 UserState* userState = getUserState(userId); in writeMasterKey()
79 ResponseCode KeyStore::readMasterKey(const android::String8& pw, uid_t userId) { in readMasterKey() argument
80 UserState* userState = getUserState(userId); in readMasterKey()
137 void KeyStore::resetUser(uid_t userId, bool keepUnenryptedEntries) { in resetUser() argument
140 UserState* userState = getUserState(userId); in resetUser()
141 if (list(prefix, &aliases, userId) != ::NO_ERROR) { in resetUser()
151 ResponseCode rc = get(filename, &blob, ::TYPE_ANY, userId); in resetUser()
162 del(filename, ::TYPE_ANY, userId); in resetUser()
166 ALOGE("Failed to delete user %d's master key", userId); in resetUser()
170 ALOGE("Failed to remove user %d's directory", userId); in resetUser()
175 bool KeyStore::isEmpty(uid_t userId) const { in isEmpty()
176 const UserState* userState = getUserState(userId); in isEmpty()
206 void KeyStore::lock(uid_t userId) { in lock() argument
207 UserState* userState = getUserState(userId); in lock()
212 ResponseCode KeyStore::get(const char* filename, Blob* keyBlob, const BlobType type, uid_t userId) { in get() argument
213 UserState* userState = getUserState(userId); in get()
226 if (upgradeBlob(filename, keyBlob, version, type, userId)) { in get()
227 if ((rc = this->put(filename, keyBlob, userId)) != NO_ERROR || in get()
243 importKey(keyBlob->getValue(), keyBlob->getLength(), filename, userId, in get()
249 rc = get(filename, keyBlob, TYPE_KEY_PAIR, userId); in get()
256 rc = this->put(filename, keyBlob, userId); in get()
267 ResponseCode KeyStore::put(const char* filename, Blob* keyBlob, uid_t userId) { in put() argument
268 UserState* userState = getUserState(userId); in put()
273 ResponseCode KeyStore::del(const char* filename, const BlobType type, uid_t userId) { in del() argument
275 ResponseCode rc = get(filename, &keyBlob, type, userId); in del()
348 android::Vector<android::String16>* matches, uid_t userId) { in list() argument
350 UserState* userState = getUserState(userId); in list()
413 uid_t userId, int32_t flags) { in importKey() argument
469 return put(filename, &keyBlob, userId); in importKey()
489 uid_t userId = get_user_id(uid); in getKeyForName() local
491 ResponseCode responseCode = get(filepath8.string(), keyBlob, type, userId); in getKeyForName()
500 responseCode = get(filepath8.string(), keyBlob, type, userId); in getKeyForName()
513 filepath8 = android::String8::format("%s/%s", getUserState(userId)->getUserDirName(), in getKeyForName()
520 return get(filepath8.string(), keyBlob, type, userId); in getKeyForName()
523 UserState* KeyStore::getUserState(uid_t userId) { in getUserState() argument
527 if (state->getUserId() == userId) { in getUserState()
532 UserState* userState = new UserState(userId); in getUserState()
538 ALOGE("User initialization failed for %u; subsuquent operations will fail", userId); in getUserState()
545 uid_t userId = get_user_id(uid); in getUserStateByUid() local
546 return getUserState(userId); in getUserStateByUid()
549 const UserState* KeyStore::getUserState(uid_t userId) const { in getUserState()
553 if (state->getUserId() == userId) { in getUserState()
562 uid_t userId = get_user_id(uid); in getUserStateByUid() local
563 return getUserState(userId); in getUserStateByUid()