aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authoralex-nitrokey <alex@nitrokey.com>2019-01-23 11:23:33 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2019-02-11 15:32:35 +0100
commit9d41c8e73e4bc0a3031fce96dbda965fbd9ae0a7 (patch)
tree1ea7af61e6404a61284002247566882a95107279 /data
parentc51fe35aec5d5422a43f384a6e3fa13c4df88d4b (diff)
downloadlibnitrokey-9d41c8e73e4bc0a3031fce96dbda965fbd9ae0a7.tar.gz
libnitrokey-9d41c8e73e4bc0a3031fce96dbda965fbd9ae0a7.tar.bz2
Add guards and harmonize old and new rule
Diffstat (limited to 'data')
-rw-r--r--data/41-nitrokey.rules32
1 files changed, 30 insertions, 2 deletions
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 <http://www.gnu.org/licenses/>.
+#
+# 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"