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') 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