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: yubikey-personalisation_1.5.1-1^0 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa49adaa9322dd46a5f8e6a839342fbf480b0a00;p=yubikey-personalization.old 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 5db67e6..4afbae8 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 00062f8..34d134e 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