summaryrefslogtreecommitdiffstats
path: root/gatekeeperd
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2015-06-23 11:27:09 -0700
committerAndres Morales <anmorales@google.com>2015-06-23 11:29:57 -0700
commit9ea9a06b062a22039929e6fd654d5f5e92221446 (patch)
tree7cc48f0bcfa6aed4fb165e7fdee53cfbe5add88f /gatekeeperd
parent835d96eae59aefeaa32fda3218246db51bf22fab (diff)
downloadsystem_core-9ea9a06b062a22039929e6fd654d5f5e92221446.zip
system_core-9ea9a06b062a22039929e6fd654d5f5e92221446.tar.gz
system_core-9ea9a06b062a22039929e6fd654d5f5e92221446.tar.bz2
[gatekeeperd] invalidate stale password cache
password may change offline, invalidate the cache if it is stale Bug: 22019187 Change-Id: I2aaae978c8bd4629a0f93df3778d8679ae9b53d5
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 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;