From be598301fe099be177acefff54f9db65fe263cc7 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 1 Oct 2013 10:42:47 +0200 Subject: update for systemd in initramfs --- udev/20-ykfde.rules | 4 ++++ udev/ykfde | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 udev/20-ykfde.rules create mode 100755 udev/ykfde (limited to 'udev') diff --git a/udev/20-ykfde.rules b/udev/20-ykfde.rules new file mode 100644 index 0000000..54cd1c2 --- /dev/null +++ b/udev/20-ykfde.rules @@ -0,0 +1,4 @@ +# do challenge response with Yubikey II and try to answer +# password agent +ACTION=="add", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0010|0110|0111", \ + RUN+="/usr/lib/udev/ykfde" diff --git a/udev/ykfde b/udev/ykfde new file mode 100755 index 0000000..ce83117 --- /dev/null +++ b/udev/ykfde @@ -0,0 +1,9 @@ +#!/bin/sh + +source /etc/ykfde.conf + +# Looks like Yubikey is reset after challenge response, triggering +# yet another add event. Ignore if the file exists. +[ -s /crypto_keyfile.bin ] && exit 0 + +ykchalresp -${YKFDE_SLOT:-2} "$(cat /ykfde-challenge)" > /crypto_keyfile.bin 2>/dev/null -- cgit v1.2.3-70-g09d2