[gatekeeperd] verify a password after enrolling successfully

Bug: 20918106
Change-Id: Ia3cb6d1375d9ee2a6e543ee97d37b7c4f0459447
This commit is contained in:
Andres Morales 2015-06-01 17:23:04 -07:00
parent e2452b4bf3
commit 531e3e83c2
1 changed files with 6 additions and 0 deletions

View File

@ -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;