summaryrefslogtreecommitdiff
path: root/rules.d
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-11-05 16:42:57 +0100
committerLennart Poettering <lennart@poettering.net>2019-12-09 19:25:25 +0100
commitf573629c0bba7cb3cbd49f149945e802c136788a (patch)
treeaf381484c7efed44a842ffcb86cf3777138ceea2 /rules.d
parent839fddbe500f40f2db5ab5c6cbcec28668521b8b (diff)
downloadsystemd-f573629c0bba7cb3cbd49f149945e802c136788a.tar.gz
udev: mark all ccid/security devices with a special tag
This adds a udev tag that is supposed to be attached to all devices that might potentially expose a PKCS#11 slot, i.e. CCID smartcards and similar. We can then use the appearance of devices of this type as trigger to rescan PKCS#11 slots.
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/60-fido-id.rules6
1 files changed, 6 insertions, 0 deletions
diff --git a/rules.d/60-fido-id.rules b/rules.d/60-fido-id.rules
index fcf5079704..c7d5d2ff1d 100644
--- a/rules.d/60-fido-id.rules
+++ b/rules.d/60-fido-id.rules
@@ -4,4 +4,10 @@ ACTION=="remove", GOTO="fido_id_end"
SUBSYSTEM=="hidraw", IMPORT{program}="fido_id"
+# Tag any form of security token as such
+ENV{ID_SECURITY_TOKEN}=="1", TAG+="security-device"
+
+# Tag any CCID device (i.e. Smartcard Reader) as security token
+SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="0b", TAG+="security-device"
+
LABEL="fido_id_end"