From dbdcd51f78bde5e9033d98d61bbb750c868bde9d Mon Sep 17 00:00:00 2001 From: Vincent Pelletier Date: Sat, 27 Feb 2021 00:17:06 +0000 Subject: [PATCH] rules: Move ID_SMARTCARD_READER definition to a <70 configuration. 70-uaccess.rules sets the uaccess tag on devices with ID_SMARTCARD_READER set, but it is set in 99-systemd.rules . Move this to a 60-*.rules which already matches USB CCID class, factorising the matching, so 70-uaccess.rules sets up these devices as expected. --- rules.d/60-fido-id.rules | 3 ++- rules.d/99-systemd.rules.in | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rules.d/60-fido-id.rules b/rules.d/60-fido-id.rules index c7d5d2ff1dd..48c259ee04e 100644 --- a/rules.d/60-fido-id.rules +++ b/rules.d/60-fido-id.rules @@ -7,7 +7,8 @@ SUBSYSTEM=="hidraw", IMPORT{program}="fido_id" # Tag any form of security token as such ENV{ID_SECURITY_TOKEN}=="1", TAG+="security-device" +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0b????:*", ENV{ID_SMARTCARD_READER}="1" # Tag any CCID device (i.e. Smartcard Reader) as security token -SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="0b", TAG+="security-device" +ENV{ID_SMARTCARD_READER}=="1", TAG+="security-device" LABEL="fido_id_end" diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in index cf2f9935d96..be972f90fb8 100644 --- a/rules.d/99-systemd.rules.in +++ b/rules.d/99-systemd.rules.in @@ -47,7 +47,6 @@ SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsys SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k", \ ENV{SYSTEMD_WANTS}+="bluetooth.target", ENV{SYSTEMD_USER_WANTS}+="bluetooth.target" -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0b????:*", ENV{ID_SMARTCARD_READER}="1" ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target", ENV{SYSTEMD_USER_WANTS}+="smartcard.target" SUBSYSTEM=="sound", KERNEL=="controlC*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target", ENV{SYSTEMD_USER_WANTS}+="sound.target"