summaryrefslogtreecommitdiff
path: root/gatekeeperd
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2015-06-23 22:21:15 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-23 22:21:15 +0000
commit991680bf600bb24a623973f2ee0f310c3d561467 (patch)
treeb5f39a1e3ea9234a1af6a2a58e1dfe3142624428 /gatekeeperd
parent2770d65f35e821a461aeb685c607097a7e3c531d (diff)
parent343d708234636d505653d4ed1c9104463db76bab (diff)
am 343d7082: am b2856ddb: Merge "[gatekeeperd] invalidate stale password cache" into mnc-dev
* commit '343d708234636d505653d4ed1c9104463db76bab': [gatekeeperd] invalidate stale password cache
Diffstat (limited to 'gatekeeperd')
-rw-r--r--gatekeeperd/SoftGateKeeper.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gatekeeperd/SoftGateKeeper.h b/gatekeeperd/SoftGateKeeper.h
index 4c16c52bb..75fe11dc1 100644
--- a/gatekeeperd/SoftGateKeeper.h
+++ b/gatekeeperd/SoftGateKeeper.h
@@ -151,8 +151,8 @@ public:
bool DoVerify(const password_handle_t *expected_handle, const SizedBuffer &password) {
FastHashMap::const_iterator it = fast_hash_map_.find(expected_handle->user_id);
- if (it != fast_hash_map_.end()) {
- return VerifyFast(it->second, password);
+ if (it != fast_hash_map_.end() && VerifyFast(it->second, password)) {
+ return true;
} else {
if (GateKeeper::DoVerify(expected_handle, password)) {
uint64_t salt;