--- /dev/null
+ACTION!="add|change", GOTO="yubico_end"
+
+# Udev rules for letting the console user access the Yubikey USB
+# device node, needed for challenge/response to work correctly.
+
+# Yubico Yubikey II
+ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0010", \
+ ENV{ID_SECURITY_TOKEN}="1"
+
+LABEL="yubico_end"
AM_CONDITIONAL([BACKEND_WINDOWS], test x$with_backend = xwindows)
AC_ARG_WITH([udevrulesdir],
- AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules]),
+ AS_HELP_STRING([--with-udevrulesdir=DIR], [Install udev rules into this directory]),
[], [])
AC_SUBST([udevrulesdir], [$with_udevrulesdir])
+# It would be more clear to wrap this in AC_MSG_CHECKING and AC_MSG_RESULT, but
+# this works too. If udevrulesdir is set, check for udev >= 188, which should
+# have the ID_SECURITY_TOKEN tag in 70-uaccess.rules / 70-udev-acl-rules. If
+# a recent enough udev is not found, fall back to using the old
+# 70-yubikey.rules file.
+if test -n "$udevrulesdir"; then
+ PKG_CHECK_MODULES([UDEV], [udev >= 188],
+ udevrulesfile=69-yubikey.rules,
+ udevrulesfile=70-yubikey.rules,
+ )
+ AC_SUBST([udevrulesfile], [$udevrulesfile])
+fi
+
gl_LD_VERSION_SCRIPT
gl_VALGRIND_TESTS
Compiler: ${CC}
Library types: Shared=${enable_shared}, Static=${enable_static}
USB backend: ${with_backend}
- udev rules: ${with_udevrulesdir:-N/A}
+ udev rules dir: ${with_udevrulesdir:-N/A}
+ udev rules file: ${udevrulesfile:-N/A}
])