From c51fe35aec5d5422a43f384a6e3fa13c4df88d4b Mon Sep 17 00:00:00 2001 From: alex-nitrokey Date: Thu, 3 Jan 2019 10:30:51 +0100 Subject: Add Nitrokey FIDO U2F entry --- data/41-nitrokey.rules | 2 ++ 1 file changed, 2 insertions(+) (limited to 'data/41-nitrokey.rules') diff --git a/data/41-nitrokey.rules b/data/41-nitrokey.rules index 764f4bf..99f6554 100644 --- a/data/41-nitrokey.rules +++ b/data/41-nitrokey.rules @@ -1,5 +1,7 @@ # Nitrokey U2F KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="f1d0" +# Nitrokey FIDO U2F +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4287", TAG+="uaccess" SUBSYSTEM!="usb", GOTO="gnupg_rules_end" ACTION!="add", GOTO="gnupg_rules_end" -- cgit v1.2.3 From 9d41c8e73e4bc0a3031fce96dbda965fbd9ae0a7 Mon Sep 17 00:00:00 2001 From: alex-nitrokey Date: Wed, 23 Jan 2019 11:23:33 +0100 Subject: Add guards and harmonize old and new rule --- data/41-nitrokey.rules | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'data/41-nitrokey.rules') diff --git a/data/41-nitrokey.rules b/data/41-nitrokey.rules index 99f6554..6911b50 100644 --- a/data/41-nitrokey.rules +++ b/data/41-nitrokey.rules @@ -1,7 +1,35 @@ +# +# Copyright (c) 2015-2019 Nitrokey UG +# +# This file is part of libnitrokey. +# +# libnitrokey is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# any later version. +# +# libnitrokey is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with libnitrokey. If not, see . +# +# SPDX-License-Identifier: LGPL-3.0 +# + + +# this udev file should be used with udev 188 and newer +ACTION!="add|change", GOTO="u2f_end" + # Nitrokey U2F -KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="f1d0" +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="f1d0", MODE="0664", GROUP+="plugdev", TAG+="uaccess" # Nitrokey FIDO U2F -KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4287", TAG+="uaccess" +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4287", GROUP+="plugdev", TAG+="uaccess" + +LABEL="u2f_end" + SUBSYSTEM!="usb", GOTO="gnupg_rules_end" ACTION!="add", GOTO="gnupg_rules_end" -- cgit v1.2.3 From 1150baa1bc7d392d9c05abea8252d5e59375386b Mon Sep 17 00:00:00 2001 From: alex-nitrokey Date: Wed, 23 Jan 2019 16:12:00 +0100 Subject: Add MODE tag for FIDO U2F --- data/41-nitrokey.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/41-nitrokey.rules') diff --git a/data/41-nitrokey.rules b/data/41-nitrokey.rules index 6911b50..59701eb 100644 --- a/data/41-nitrokey.rules +++ b/data/41-nitrokey.rules @@ -26,7 +26,7 @@ ACTION!="add|change", GOTO="u2f_end" # Nitrokey U2F KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="f1d0", MODE="0664", GROUP+="plugdev", TAG+="uaccess" # Nitrokey FIDO U2F -KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4287", GROUP+="plugdev", TAG+="uaccess" +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4287", MODE="0660", GROUP+="plugdev", TAG+="uaccess" LABEL="u2f_end" -- cgit v1.2.3 From ca34dc895275c8384805020a92e8243fd9cf8543 Mon Sep 17 00:00:00 2001 From: alex-nitrokey Date: Mon, 28 Jan 2019 09:54:33 +0100 Subject: remove legacy plugdev groups tag --- data/41-nitrokey.rules | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'data/41-nitrokey.rules') diff --git a/data/41-nitrokey.rules b/data/41-nitrokey.rules index 59701eb..e78fa3a 100644 --- a/data/41-nitrokey.rules +++ b/data/41-nitrokey.rules @@ -24,9 +24,9 @@ ACTION!="add|change", GOTO="u2f_end" # Nitrokey U2F -KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="f1d0", MODE="0664", GROUP+="plugdev", TAG+="uaccess" +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="f1d0", TAG+="uaccess" # Nitrokey FIDO U2F -KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4287", MODE="0660", GROUP+="plugdev", TAG+="uaccess" +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4287", TAG+="uaccess" LABEL="u2f_end" @@ -36,15 +36,15 @@ ACTION!="add", GOTO="gnupg_rules_end" # USB SmartCard Readers ## Crypto Stick 1.2 -ATTR{idVendor}=="20a0", ATTR{idProduct}=="4107", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="plugdev", TAG+="uaccess" +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4107", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", TAG+="uaccess" ## Nitrokey Pro -ATTR{idVendor}=="20a0", ATTR{idProduct}=="4108", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="plugdev", TAG+="uaccess" +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4108", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", TAG+="uaccess" ## Nitrokey Storage -ATTR{idVendor}=="20a0", ATTR{idProduct}=="4109", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="plugdev", TAG+="uaccess" +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4109", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", TAG+="uaccess" ## Nitrokey Start -ATTR{idVendor}=="20a0", ATTR{idProduct}=="4211", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="plugdev", TAG+="uaccess" +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4211", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", TAG+="uaccess" ## Nitrokey HSM -ATTR{idVendor}=="20a0", ATTR{idProduct}=="4230", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="plugdev", TAG+="uaccess" +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4230", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", TAG+="uaccess" LABEL="gnupg_rules_end" -- cgit v1.2.3 From 42ac8b2915271733b58a2af04999eba6bce9ebd6 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Fri, 8 Feb 2019 12:44:39 +0100 Subject: Update description Signed-off-by: Szczepan Zalega --- data/41-nitrokey.rules | 6 ++++-- data/41-nitrokey_old.rules | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'data/41-nitrokey.rules') diff --git a/data/41-nitrokey.rules b/data/41-nitrokey.rules index e78fa3a..0099edf 100644 --- a/data/41-nitrokey.rules +++ b/data/41-nitrokey.rules @@ -19,8 +19,10 @@ # SPDX-License-Identifier: LGPL-3.0 # - -# this udev file should be used with udev 188 and newer +# Here rules in new style should be provided. Matching devices should be tagged with 'uaccess'. +# File prefix number should be lower than 73, to be correctly processed by the Udev. +# Recommended udev version: >= 188. +# ACTION!="add|change", GOTO="u2f_end" # Nitrokey U2F diff --git a/data/41-nitrokey_old.rules b/data/41-nitrokey_old.rules index f4aeffe..7780b60 100644 --- a/data/41-nitrokey_old.rules +++ b/data/41-nitrokey_old.rules @@ -19,8 +19,11 @@ # SPDX-License-Identifier: LGPL-3.0 # - -# this udev file should be used with udev 188 and newer +# Here rules in old style should be provided. Matching devices should be added to 'plugdev' group, +# and with mode set to "0660". +# File prefix number should be lower than 73, to be correctly processed by the Udev. +# Recommended udev version: < 188. +# ACTION!="add|change", GOTO="u2f_end" # Nitrokey U2F -- cgit v1.2.3