Also unset the private library if set and make libfprint to only link
with the tod one.
This fixes the issue we had with wrong symbols shared by multiple
libraries
This these functions are not really needed by anything else than
FpDevice, so move them back to the cpp file, so that we don't expose
them in the private library, given that we don't need them
We have an issue where some symbols are exposed by both the tod library
and the public one, and this may lead to big issues like GType's being
defined multiple times.
So add a test checking whether this is working
See: 3v1n0/libfprint#1
It may cause initializing a type twice in some cases, and thus some
hard-locking, let's just avoid it since we don't care about full debug
strings here.
Newer fprintd supports duplicate-detection, this implies sending to the
device an empty prints gallery, expecting the device to give us a
matched print against its storage.
In case the device has no storage we're doing this anyway, but goodix
doesn't handle this properly, so let's just ignore the case if no prints
are passed.
Given that we won't go in the past, it's better to be explicit in
using versions for symbols so that all new symbols will be added to the
latest listed release, while others won't be moved from where they are.
The internal storage of this device can get messed up by other operating
systems, so it's handy to be able to clear it.
I'm not 100% sure whether the commands I've sent to the device are
exactly what is supposed to be used (just a guess), but it did seem to
work, and it even fixed another issue I had.
The API should return the recognized print, even if none of the prints
given in the gallery (or the one passed to verify) matched. Without this
the garbage-collection of left-over prints does not work, causing issues
after reinstall.
Fixes: #444
In commit 5c28654d9 ("goodixmoc: Fix print template parsing") the length
check for the verify and duplicate check responses by requiring two
extra bytes at the end of the message.
There were also issues in other places where the length was not checked
correctly, including a scenario that could cause a read beyond the end
of the buffer.
Related: #444
* Allow FPI_PRINT_NBIS to be extended rather than overridden if a user
supplies an existing FpPrint template with data;
* Prints will only be extended if a device has the required feature.
For image-based devices this feature is added by default since they
typically do not have storage (this can be overridden at the child
class level).
Extending an existing FpPrint requires passing a template print with
existing data during the enrollment process. This is done because the
caller is responsible for maintaining the fingerprint database and doing
the necessary deserialization operations if needed. The existing
example program is updated to show how to do that.
This ensures that we have processed all hotplug events before
considering enumeration to be complete. This is important due to USB
persist being turned off. At resume time, devices will disappear and
immediately re-appear. In this situatoin, enumerate could first see the
old state with a removed device resulting in it to not be discovered.
As a hotplug event is semingly emitted by the kernel immediately, we
can simply make sure to process this hotplug event before returning
from enumerate.
Closes: fprintd#119
Tag 1.94.2
Git-EVTag-v0-SHA512: 3eed67186b9533300d5ba70ce9abc36055068c3eafa663a48c655ef0e8c7a6928bb7cd875a7ae1860a65324fb806da79d83ca3c97a0640b10dc92dc497f04f11
This ensures that we have processed all hotplug events before
considering enumeration to be complete. This is important due to USB
persist being turned off. At resume time, devices will disappear and
immediately re-appear. In this situatoin, enumerate could first see the
old state with a removed device resulting in it to not be discovered.
As a hotplug event is semingly emitted by the kernel immediately, we
can simply make sure to process this hotplug event before returning
from enumerate.
Closes: fprintd#119
The length is only a single byte in the transfer. However, the struct
had a uint32_t in that place, breaking the sizeof() calculation and
seemingly creating issues for certain lengths of user id strings (which
depend on the username).
Fix this by changing the type to uint8_t. Also add the initial 0x43
prefix byte and a byte of apparent padding that the struct contains.
Leave the two reserved bytes at the end, as they seem to actually have a
meaning (i.e. they are seemingly send in listings).
This effectively makes the struct one byte smaller, bringing it down to
127 bytes from 128 bytes.
Closes: #428, #404
While useful, there are advantages for this to be done by the
surrounding code (i.e. fprintd). As such, remove the identify stage from
the goodix driver and rely on fprintd doing it for us.
One can probably argue that neither solution is perfect. Ideally, we
would probably return the information required to delete the old print
to the upper stack and let the driver/device handle the duplicate
checking.
However, for now this works well. We may need to reconsider this if we
get devices that do the duplicate checking transparently and just throw
an enroll error.
NOTE: The driver did not report any progress for the identify step. As
such, the number of enroll steps reported by the device remain the same.
Closes: #415
It appears the kernel automatically "fixes" this mistake and it works.
the transfer in question is an interrupt transfer and should be submitted
as such. Do that in order to make things more correct and so that the
test can run.
Expose new versioned symbols that work with previous API so that we can
keep compatibility with old drivers without having to recompile them.
We disable the GCancellable API in delayed SSM actions since that was
something that wasn't really needed and prone to errors, instead of
just re-implementing it as it was in the TOD case.