]> err.no Git - yubikey-personalization.old/commitdiff
Add udev rules to grant the console user access to the yubikey device node
authorTollef Fog Heen <tfheen@err.no>
Thu, 14 Apr 2011 20:40:02 +0000 (22:40 +0200)
committerTollef Fog Heen <tfheen@err.no>
Thu, 14 Apr 2011 20:40:29 +0000 (22:40 +0200)
70-yubikey.rules [new file with mode: 0644]
Makefile.am
configure.ac

diff --git a/70-yubikey.rules b/70-yubikey.rules
new file mode 100644 (file)
index 0000000..d4525d3
--- /dev/null
@@ -0,0 +1,8 @@
+
+# Udev rules for letting the console user access the Yubikey USB
+# device node, needed for challenge/response to work correctly.
+
+ACTION=="add|change", SUBSYSTEM=="usb", \
+  ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0010", \
+  TEST=="/var/run/ConsoleKit/database", \
+  RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
index 11d501eb0f0e4c4cef6555422cf488a4bbf1fa05..3dacae0c93d088154a7609eabc524b79be1aa4f6 100644 (file)
@@ -77,6 +77,10 @@ EXTRA_DIST = doc/Compatibility.asciidoc doc/Make-Release.asciidoc doc/Read-Me.as
 # Dist contrib stuff.
 EXTRA_DIST += contrib/README contrib/programming.sh
 
+udevrulesdir=@udevrulesdir@
+dist_udevrules_DATA = \
+        70-yubikey.rules
+
 # Release
 
 PROJECT = yubikey-personalization
index 0536f1edec462e339c1b0cf93559441deb640e4f..10671775925d9fee1403c3a5e53e1e1bca0b84c1 100644 (file)
@@ -120,6 +120,12 @@ AM_CONDITIONAL([BACKEND_LIBUSB_1_0], test x$with_backend = xlibusb-1.0)
 AM_CONDITIONAL([BACKEND_OSX], test x$with_backend = xosx)
 AM_CONDITIONAL([BACKEND_WINDOWS], test x$with_backend = xwindows)
 
+AC_ARG_WITH([udevrulesdir],
+        AS_HELP_STRING([--with-udevrulesdir=DIR], [Diectory for udev rules]),
+        [],
+        [])
+AC_SUBST([udevrulesdir], [$with_udevrulesdir])
+
 gl_LD_VERSION_SCRIPT
 gl_VALGRIND_TESTS