mirror of
https://gitlab.freedesktop.org/libfprint/fprintd.git
synced 2026-05-08 21:48:02 +02:00
file_storage: Ensure username/finger match our expectations
Otherwise we would need to track this separately, which would be a bit of a pain. The alternative would be simply overriding the values.
This commit is contained in:
parent
3c8ac241b8
commit
5f6e80de01
1 changed files with 8 additions and 0 deletions
|
|
@ -220,6 +220,14 @@ file_storage_print_data_load (FpDevice *dev,
|
|||
if (r)
|
||||
return r;
|
||||
|
||||
/* Make sure the username/finger matches our expectations. */
|
||||
if (fp_print_get_finger (new) != finger)
|
||||
return -EINVAL;
|
||||
|
||||
if (g_strcmp0 (fp_print_get_username (new), username) != 0)
|
||||
return -EINVAL;
|
||||
|
||||
/* And that the print is compatible with the device. */
|
||||
if (!fp_print_compatible (new, dev))
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue