Commit Graph

833 Commits

Author SHA1 Message Date
e09d90c81b Update ca.po 2021-08-15 12:03:43 +00:00
e3b0d52ce5 device: Catch client disconnect during Release
If the client disconnected while the release call was stopping the
current action, then the disconnect will be processed. This means that
the device can be closed already and the session is destroyed.

Add a check for this, in the same way that the vanished handler deals
with this corner case.
2021-08-11 08:58:26 +00:00
70182083a1 Implement suspend/resume handling 2021-08-09 13:25:11 +02:00
66e7df1105 Keep alive fprintd if any device is WARM or HOT
This renames the internal "in-use" property to "busy" and redefines the
value to be TRUE either if a client is connected or if the device is
considered WARM or HOT.

This prevents fprintd shutdown while devices are warm in order to ensure
that the libfprint hardware protection is functional.
2021-08-09 13:25:11 +02:00
96b911913e data: Allow tuning USB parameters
Newer libfprint versions try to tune the wakeup and persist option of
USB devices. Add access rules to permit this.
2021-08-06 15:31:24 +02:00
37e6939fa9 tests: Verify PAM VerifyStop/disconnect behaviour
For verify-match, the PAM module should simply drop off the bus. In
other cases it should correctly run VerifyStop and Release the device.
Verify this for verify-match and verify-no-match.
2021-08-02 13:00:43 +02:00
bb23b7e9d0 pam: Immediately return verify-match/verify-no-match
In the verify-match case, this means disconnecting from the bus rather
than stopping the verification. This is the only way to make sure that
the result is immediately reported and we do not wait for the device to
be idle again (which generally means waiting for finger removal).

In the verify-no-match case we simply send the string first before the
operation is stopped. An exceeded retry limit is only reported after
VerifyStop has finished.
2021-08-02 13:00:43 +02:00
80eb673e83 tests: Remove broken test_verify_stop_restarts_immediately test
Before VerifyStart can be called again the current verify operation
needs to be completed. This requires waiting for VerifyStop to happen.

As such, remove the test, which is expected to fail randomly.
2021-08-02 13:00:43 +02:00
88d7d97c0d device: Remove incorrect comment about delaying verify-no-match result
We report a verify-match/verify-no-match immediately to the user. The
comment is not accurate.
2021-08-02 13:00:43 +02:00
6bc19c8892 tests: Speed up tests by only using parts of the image
We just need large enough samples to tell them apart correctly. For this
a 128x128 area from the center of each image is sufficient.

This speeds up the test run considerably. Other ways of achieving this
could be to also lower the number of enroll steps for the image device.
2021-07-31 11:53:33 +02:00
c690542e7c ci: Conveniently expose coverage report 2021-07-31 11:53:33 +02:00
5f6e80de01 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.
2021-07-30 23:52:00 +02:00
3c8ac241b8 tests: Try to show backtrace when killed by SIGTERM
This means that we may manage to show a backtrace if meson kills the
test process due to a timeout.
2021-07-30 23:52:00 +02:00
2bf6d6a266 device: Print error if deletion fails during garbage collection 2021-07-30 23:52:00 +02:00
be45b44337 meson: Set GLIB_VERSION_{MIN_REQUIRED,MAX_ALLOWED}
To help catch errors where we accidentally use the wrong symbols.

Closes: #42
2021-07-30 15:52:22 +02:00
572c119fd4 device: Do not use GLib 2.62 API to extend GPtrArray
We are currently only depending on 2.56.
2021-07-30 15:52:22 +02:00
980bab5135 device: Do not use GLib 2.58 API to pop from GPtrArray
We currently only depend on GLib 2.52.
2021-07-30 15:52:22 +02:00
161278cacd device: Add a memory barrier when getting session pointer
The test suite ran into a very rare error where it seemed to get stuck
during authorization. A possible explanation is that the priv->_session
pointer re-fetching is optimized away and the pointer just continues to
contain the invalid placeholder rather than an updated value.

Use g_atomic_pointer_get in order to avoid this possibility entirely.
2021-07-26 13:09:13 +00:00
2dd1cd8fc3 Translated using Weblate (French)
Currently translated at 100.0% (60 of 60 strings)

Co-authored-by: Claude Paroz <claude@2xlibre.net>
Translate-URL: https://translate.fedoraproject.org/projects/fprintd/fprintd/fr/
Translation: fprintd/fprintd
2021-07-25 14:04:40 +02:00
0de01da150 Translated using Weblate (Polish)
Currently translated at 100.0% (60 of 60 strings)

Co-authored-by: Piotr Drąg <piotrdrag@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/fprintd/fprintd/pl/
Translation: fprintd/fprintd
2021-07-24 13:08:32 +02:00
0844002b78 Translated using Weblate (Finnish)
Currently translated at 100.0% (60 of 60 strings)

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/fprintd/fprintd/fi/
Translation: fprintd/fprintd
2021-07-23 14:04:35 +02:00
9ae3c16f2d tests: Pull more OutputChecker fixes
While debugging the g-s-d testsuite a few more issues in the
OutputChecker code came up. Pull in these fixes ensuring that EOF and
the read side FD are handled correctly.
2021-07-23 13:50:52 +02:00
f4995dcabe tests: Pull OutputChecker fixes
Mark the thread as daemon. Also use poll and fix a wrong variable
reference.
2021-07-19 21:38:25 +00:00
8c0876ae49 Translated using Weblate (Korean)
Currently translated at 100.0% (60 of 60 strings)

Co-authored-by: simmon <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/fprintd/fprintd/ko/
Translation: fprintd/fprintd
2021-07-16 22:04:35 +02:00
3a96b6f2f0 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (60 of 60 strings)

Co-authored-by: Rafael Fontenelle <rafaelff@gnome.org>
Translate-URL: https://translate.fedoraproject.org/projects/fprintd/fprintd/pt_BR/
Translation: fprintd/fprintd
2021-07-16 22:04:35 +02:00
688f9b0acf Translated using Weblate (Swedish)
Currently translated at 100.0% (60 of 60 strings)

Co-authored-by: Anders Jonsson <anders.jonsson@norsjovallen.se>
Translate-URL: https://translate.fedoraproject.org/projects/fprintd/fprintd/sv/
Translation: fprintd/fprintd
2021-07-16 22:04:35 +02:00
5b9e237884 Translated using Weblate (Turkish)
Currently translated at 100.0% (60 of 60 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/fprintd/fprintd/tr/
Translation: fprintd/fprintd
2021-07-16 22:04:35 +02:00
8288c0efc7 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (60 of 60 strings)

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Translate-URL: https://translate.fedoraproject.org/projects/fprintd/fprintd/uk/
Translation: fprintd/fprintd
2021-07-16 22:04:35 +02:00
0d2dbc6179 Switch to the Fedora weblate instance for translations
Closes: #78
2021-07-01 13:11:20 +02:00
b760a82ac6 Update for 1.92.0 v1.92.0 2021-07-01 13:06:08 +02:00
f398d09b23 device: Delete existing print in EnrollStart
gnome-control-center expects to be able to re-enroll an existing print
when calling EnrollStart without deleting it first. As such, implicitly
delete the existing print rather than throwing an error.

Ideally, we'll change the API, but we need to give API users time to
adjust to the world.
2021-07-01 12:59:11 +02:00
9ec1747b84 Revert "pam_fprintd: Just return a PAM_AUTH_ERROR on unknown errors"
This reverts commit ecf6b7c323.

The idea of the commit was to make device failures less fatal to the
system. Unfortunately, we can fail quickly in this case, and returning
PAM_AUTH_ERR means that the user might run into a retry limit due to
this.

Go back to reporting PAM_AUTHINFO_UNAVAIL, it appears as the lesser evil
right now. Ideally we want to a way to tell the upper stack to retry
authentication whenever there is a good opportunity, but to not consider
it as an authentication failure.
2021-07-01 12:59:11 +02:00
6482e2dbd4 Update .po files and add .pot into git 2021-07-01 12:59:11 +02:00
ac9a1538bb po: Update translations from transifex 2021-07-01 12:59:11 +02:00
7aecec1449 data: Restrict syscall usage of fprintd
fprintd only needs very few syscalls. Mainly normal IO operations and
ioctl for USB access. All of this is covered by @system-service, we
could likely restrict it quite a bit more though.
2021-06-29 21:10:59 +02:00
0f7340130e data: Disallow fprintd to read kernel logs 2021-06-29 21:10:03 +02:00
fcd7e9bc76 data: Only allow access to USB and SPI devices
That is all that fprintd. Note that ProtectClock already restricts
device access and other device types need to be listed explicitly
because of this.
2021-06-29 20:48:16 +02:00
00629fc374 pam: Mark no-match error message as translatable 2021-06-25 16:07:53 +00:00
d7da04fa4b tests: Check storage is cleared if device does not support listing
On the first enroll, the storage must be cleared. Check that this is the
case for the first enroll but not the second.
2021-06-25 16:56:49 +02:00
7f2b5fe7ff device: Avoid clearing storage when we can garbage collect
If the device supports listing prints, then we can do more targeted
deletes once the storage runs out. As such, do not try to clear the
storage on first enroll (therefore allowing dual boot setups to work to
a limited degree).
2021-06-25 15:52:41 +02:00
f44233461f device: Clear storage before enrolling the first print
Clear the device storage before we enroll the first print. At that
point, we know that the storage should be completely empty and we have
no way of deleting "garbage" prints later if the device does not support
listing prints.
2021-04-30 14:41:12 +02:00
9e8139e6d4 README: Add note on how to enable debugging 2021-04-19 16:17:43 +00:00
e8baf4c9a9 device: Switch to new fp_device_has_feature API
The old API has been deprecated.
2021-04-19 18:12:10 +02:00
3b787aa8d1 ci: Allow failing stable build
The libfprint version in rawhide is currently too old for master
fprintd.
2021-04-19 15:59:34 +00:00
4f4b0d5f11 tests/fprintd: Check that garbage collecting works on duplicated print 2021-04-02 00:22:16 +02:00
aae37304e5 tests/fprintd: Cleanup FPrintdVirtualStorageDeviceTests
Avoid repeating the same things multiple times
2021-04-02 00:22:16 +02:00
8869b8296f tests/fprintd: Check an error is thrown if trying to re-enroll a finger 2021-04-02 00:22:16 +02:00
bc55deab2a device: Do not allow enrolling a finger that is already enrolled
This makes little sense. Users should delete the finger before trying to
enroll the same one again. So throw an error at them from EnrollStart
right away.

Fixes: #95
2021-04-02 00:22:16 +02:00
41086ac4c6 tests/fprintd: Test enroll multiple prints with duplicates 2021-04-02 00:22:16 +02:00
4e075ba491 tests/fprintd: Repeat enroll tests with virtual device with no storage
No storage-device does not support identification so we need to try this
case as well
2021-04-01 23:09:30 +02:00