From: Tollef Fog Heen Date: Thu, 14 Apr 2011 20:40:02 +0000 (+0200) Subject: Add udev rules to grant the console user access to the yubikey device node X-Git-Tag: v1.5.2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e61b9ea8deaaa140623b8ff40bd857df0167cb0a;p=yubikey-personalization Add udev rules to grant the console user access to the yubikey device node --- diff --git a/70-yubikey.rules b/70-yubikey.rules new file mode 100644 index 0000000..d4525d3 --- /dev/null +++ b/70-yubikey.rules @@ -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}" diff --git a/Makefile.am b/Makefile.am index 11d501e..3dacae0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index 0536f1e..1067177 100644 --- a/configure.ac +++ b/configure.ac @@ -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