Commit Graph

795 Commits

Author SHA1 Message Date
02468366b2 ci: Add patch to dependencies
Seems like this is not pulled in indirectly anymore.
2021-09-15 16:48:54 +02:00
3d309ea400 ci: Update to new FDO templates 2021-09-15 16:33:31 +02:00
b483edbe92 device.policy: Fix permission dialogue titles
Fix the action description for some actions which are used to both
enroll and delete fingerprints for users.

Closes: #116
2021-09-02 17:14:07 +02:00
e4c155d5b8 tests: Give fprintd some more time to be ready
While the delay inhibitor is grabbed almost immediately, this can be
slow enough to not have happened immediately after the bus name has been
registered. Add a generous timeout to prevent issues.
2021-08-25 15:27:26 +02:00
717a919996 tests: Make class cleanup more robust
Use addClassCleanup rather than doing cleanup in tearDownClass, which
may not be called in all cases.
2021-08-25 15:22:42 +02:00
e6fc854a9a tests: Use addCleanup to stop polkitd 2021-08-25 15:19:43 +02:00
5d7422e17a tests: Cleanup inhibitor fifo properly
Unlink the fifo itself and use addCleanup to close it.
2021-08-25 13:43:30 +02:00
fc7e058e93 Release 1.94.0 v1.94.0 2021-08-20 13:59:06 +00:00
ff4ba1da47 data: Allow access to hidraw devices
The elanspi driver needs access to a hidraw device in order to reset the
SPI reader.
2021-08-20 13:59:06 +00:00
626128a0fa device: Remove local storage prints if they've been removed from device
If a print we have stored locally is not available in device anymore, we
need to cleanup the local database.

We do not get a proper DATA_NOT_FOUND error for most devices (indeed, at
this point no device does this properly). As such, do this when we see a
DATA_NOT_FOUND error and the first time that we get a verify-no-match
results on a device which is capable of listing all known prints.

Co-Authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
2021-08-19 18:22:36 +02:00
0bba073dff device: Handle data not-found error as verify-no-match
In case we got a data-not-found error, it means that the device has not
such prints stored, and thus the verification failed, and there's no
need to expose the internal reasons to fprintd clients.
2021-08-18 13:09:38 +02:00
ec74c849be Translated using Weblate (Indonesian)
Currently translated at 100.0% (60 of 60 strings)

Co-authored-by: Andika Triwidada <andika@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/fprintd/fprintd/id/
Translation: fprintd/fprintd
2021-08-17 04:04:53 +02:00
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