mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 18:38:07 +00:00
3ccd267ad2
Upstream will use an hwdb to store the device autosuspend (that will be included in systemd also, so libfprint packagin may stop shipping it at later point), so use it earlier. Drop the debian specific rules to set the devices part of the `plugdev` group as such devices should not be ever readable by an user, but the access should be managed through a libfprint-based service (frpintd at the date).
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From: Benjamin Berg <bberg@redhat.com>
|
|
Date: Tue, 19 Jan 2021 13:29:17 +0100
|
|
Subject: udev-rules: Print warning if an ID is supported
|
|
|
|
---
|
|
libfprint/fprint-list-udev-rules.c | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/libfprint/fprint-list-udev-rules.c b/libfprint/fprint-list-udev-rules.c
|
|
index d6c884c..5f80fe1 100644
|
|
--- a/libfprint/fprint-list-udev-rules.c
|
|
+++ b/libfprint/fprint-list-udev-rules.c
|
|
@@ -110,6 +110,7 @@ static const FpIdEntry blacklist_id_table[] = {
|
|
static const FpDeviceClass whitelist = {
|
|
.type = FP_DEVICE_TYPE_USB,
|
|
.id_table = whitelist_id_table,
|
|
+ .id = "whitelist",
|
|
.full_name = "Hardcoded whitelist"
|
|
};
|
|
|
|
@@ -138,13 +139,15 @@ print_driver (const FpDeviceClass *cls)
|
|
|
|
key = g_strdup_printf ("%04x:%04x", entry->vid, entry->pid);
|
|
|
|
- if (g_hash_table_lookup (printed, key) != NULL)
|
|
+ if (cls == &whitelist && g_hash_table_lookup (printed, key) != NULL)
|
|
{
|
|
+ g_warning ("%s implemented by driver %s",
|
|
+ key, (const char *) g_hash_table_lookup (printed, key));
|
|
g_free (key);
|
|
continue;
|
|
}
|
|
|
|
- g_hash_table_insert (printed, key, GINT_TO_POINTER (1));
|
|
+ g_hash_table_insert (printed, key, (void *) cls->id);
|
|
|
|
if (num_printed == 0)
|
|
g_print ("# %s\n", cls->full_name);
|