When deleting prints, the API user should also delete the print from the
storage (for devices that support on-device storage). Add an example to
show how to do this.
This is useful as these devices may require extra work by API users,
such as also deleting prints from the device when deleting them from
the local storage.
Some new fingerprint devices store the information required for matching
on the sensor itself, without ever disclosing this data to the host. In
this case we need to delete prints not only from local storage but also
from the device storage.
This commits adds the internal and external API required to do so.
We will need new API for these devices such as deleting prints from the
device. This is a basic initial driver only implementing the currently
available API allowing tests and further development.
With this script it is possible to test libfprint/fprintd without any
hardware device. The image needs to be provides as a PNG with the alpha
channel storing the print data.
See the comment in the file on how the script can be used.
These prints are from NIST and are not copyrighted. PNG files are
provided where the print is stored in the alpha channel (for consumption
by test scripts).
To support other bus types (including virtual) we will need to poll
other source than libusb. So use GMainContext so that we will not
need to implement polling ourselves, hopefully simplifying the logic to
add more event sources.
The upekts driver needs upek_proto.c while the upektc driver does not.
Move the corresponding source file entries so that both drivers compile
standalone.
The only API user currently seems to be the examples. fprintd has its
own storage and that will be a good idea in general.
So deprecate the API, we'll need to find a different solution for the
examples eventually.
The function was committed by accident as part of commit d18e1053
(lib: Add a way to name timeouts). It is not used anywhere and
fpi_timeout_cancel_all_for_dev exists, is exported and used and serves
the same purpose.
If users put their finger on the sensor between the bulge and
"un-bulge" area first and then swipe, the captured image would
be bad.
Skipping more frames can reduce the impact, so bump
ELAN_SKIP_LAST_FRAMES to 2.
Check for the mean calibration being outside of range to know whether we
require a recalibration. Continue with the usual checks if the
calibration value is within range.
The dimensions some sensors return is the maximum zero-based index
rather than the number of pixels. Assuming every sensor has an
even number of pixels is safe.
The call to sleep(1) inside of the enrollment loop caused a crash
on at least the etes603 driver.
Because in fp_enroll_finger_img the function enters an event
handling loop. This loop needs to start before the next libusb
event timeout. Which would not happen in the etes603 driver
because the timeout there was set to 1 second as well.
This commit fixes a hang in gnome-settings when trying to enroll a finger.
The same issue could be seen in the enroll example. Previously the enroll
example would hang on "deactivating" because at some point dev->is_active
is set to false and m_exit_start is never called.
Work-around SELinux AVC warnings caused by p11-kit (which is an NSS
dependency) trying to load the root user's p11-kit configs. We disable
this feature using the P11_KIT_NO_USER_CONFIG envvar.
See https://bugzilla.redhat.com/show_bug.cgi?id=1688583
‘img->key_number’ variable is originally from the device through bulk
endpoint of USB. The variable is immediately assigned to ‘buf[0]’ for
sending to control endpoint of the device. Here, integer overflow may
occur when the ‘img->key_number’ attempts to assign a value that is
outside of type range of ‘char’ to the ‘buf[0]’
Remove the sanity check added in commit b1afa9d, having a poll setup
isn't necessary to use timeouts, as long as only sync functions are
used.
Closes: #139
This will allow us to segragate helper functions that we want to use
within NBIS. The first helper will be a macro checking for overflow in
multiplications.
Free the maps if we're not returning them.
libfprint/nbis/mindtct/maps.c:176:14: warning: Potential leak of memory pointed to by 'direction_map'
return(ret);
^~~
libfprint/nbis/mindtct/maps.c:195:14: warning: Potential leak of memory pointed to by 'low_contrast_map'
return(ret);
^~~
libfprint/nbis/mindtct/maps.c:195:14: warning: Potential leak of memory pointed to by 'low_flow_map'
return(ret);
^~~