virtual-device: Add non-imaging mock driver

Has 2 variants, one that supports identify, one that doesn't.

The mode of operation for this device is:
- Run fprintd with "FP_VIRTUAL_DEVICE=/tmp/fprint.socket"
- As root:
FP_VIRTUAL_DEVICE=/tmp/fprint.socket ./sendvirtcmd.py "ADD left-middle testuser success"
FP_VIRTUAL_DEVICE=/tmp/fprint.socket ./sendvirtcmd.py "ADD right-middle testuser failure"
- As testuser:
fprintd-enroll -f left-middle-finger
fprintd-enroll -f right-middle-finger

Now, across fprintd restarts (as it has its own storage), verification
will always succeed for user "testuser" with the "left-middle-finger".

Using the FP_VIRTUAL_DEVICE_IDENT envvar instead will allow
identification, with the first found "successful" finger being presented
as the identified one.
This commit is contained in:
Bastien Nocera
2020-04-09 16:18:22 +02:00
parent 8632877b95
commit 4fdf0eae0f
3 changed files with 460 additions and 1 deletions

View File

@@ -88,7 +88,7 @@ cairo_dep = dependency('cairo', required: false)
# Drivers
drivers = get_option('drivers').split(',')
virtual_drivers = [ 'virtual_image' ]
virtual_drivers = [ 'virtual_image', 'virtual_device' ]
default_drivers = [
'upektc_img',
'vfs5011',