summaryrefslogtreecommitdiff
path: root/gatekeeperd
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2015-06-01 17:23:04 -0700
committerAndres Morales <anmorales@google.com>2015-06-02 10:43:21 -0700
commit531e3e83c28a2fdb2270b26b2bf0333ed6e30682 (patch)
tree5f26d362c2b585038e49c89f84efd3b68cbeca12 /gatekeeperd
parente2452b4bf3c247fbfd759d047e3c5dedfb6f3202 (diff)
[gatekeeperd] verify a password after enrolling successfully
Bug: 20918106 Change-Id: Ia3cb6d1375d9ee2a6e543ee97d37b7c4f0459447
Diffstat (limited to 'gatekeeperd')
-rw-r--r--gatekeeperd/gatekeeperd.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gatekeeperd/gatekeeperd.cpp b/gatekeeperd/gatekeeperd.cpp
index ad16fa5dd..c0f227929 100644
--- a/gatekeeperd/gatekeeperd.cpp
+++ b/gatekeeperd/gatekeeperd.cpp
@@ -136,6 +136,12 @@ public:
gatekeeper::password_handle_t *handle =
reinterpret_cast<gatekeeper::password_handle_t *>(*enrolled_password_handle);
store_sid(uid, handle->user_id);
+ bool rr;
+
+ // immediately verify this password so we don't ask the user to enter it again
+ // if they just created it.
+ verify(uid, *enrolled_password_handle, sizeof(password_handle_t), desired_password,
+ desired_password_length, &rr);
}
return ret;