summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2015-06-23 18:41:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-23 18:41:38 +0000
commitb2856ddbd3555ccffa704496293497f091c2237e (patch)
tree0458374cdd46ace247c429b2e1b2a9069ec562fc
parentfbf61b1f761618af83c82a3a61f2bff81a66fbf8 (diff)
parent9ea9a06b062a22039929e6fd654d5f5e92221446 (diff)
downloadsystem_core-b2856ddbd3555ccffa704496293497f091c2237e.zip
system_core-b2856ddbd3555ccffa704496293497f091c2237e.tar.gz
system_core-b2856ddbd3555ccffa704496293497f091c2237e.tar.bz2
Merge "[gatekeeperd] invalidate stale password cache" into mnc-dev
-rw-r--r--gatekeeperd/SoftGateKeeper.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gatekeeperd/SoftGateKeeper.h b/gatekeeperd/SoftGateKeeper.h
index 4c16c52..75fe11d 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;