cryptopensc support for usb readers broken

Bug #899971 reported by Magosányi Árpád
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cryptsetup
New
Undecided
Unassigned

Bug Description

1. The cryptopensc hook misses to copy over some files to initramfs. It is probably due to the fact that it blindly copies /usr/lib/pcsc, missing some library dependencies and a file symlinked there.
In case of libccid the hook at the end of report adds the needed files as a workaround.
2. Also stopping the pcsc daemon does not work (for a long time, probably since maverick):
- it tries to use start-stop-daemon, which is not in the initramfs
- it looks at /sbin for pcscd and it is now in /usr/sbin
As a workaround, the init script at the end of the report works
3. I'm not sure of this/etc/initramfs-tools/hooks/straceu one, but it seems that the cryptopensc script does not ask the password using plymouth. I could use it only by pressing Esc in the boot screen. Maybe I was the impatient one.

---------------- hook /etc/initramfs-tools/hooks/cryptopenscusb ---------
#!/bin/sh

set -e

PREREQ=""

prereqs()
{
    echo "$PREREQ"
}

case $1 in
    prereqs)
        prereqs
        exit 0
        ;;
esac

. /usr/share/initramfs-tools/hook-functions

# Hooks for loading smartcard reading software into the initramfs
copy_exec /lib/libpcsclite.so.1
copy_exec /lib/x86_64-linux-gnu/libgcc_s.so.1
copy_exec /lib/x86_64-linux-gnu/libusb-1.0.so.0
copy_exec /etc/libccid_Info.plist

-----------------init script /etc/initramfs-tools/scripts/local-bottom/cryptopensc2 --------------
#!/bin/sh

set -e

PREREQ=""

prereqs()
{
    echo "$PREREQ"
}

case $1 in
    prereqs)
        prereqs
        exit 0
        ;;
esac

. /scripts/functions

# Hook for stopping smartcard reading software

if [ ! -e /usr/sbin/pcscd ]; then
    echo "no pcscd"
    exit 0
fi

# Start pcscd daemon nomrally. If it was started in foregound, chances are
# it'll harmlessly complain about missing /var/run/pcscd* files due to the root
# filessytem being remounted.
kill -9 `ps ax |grep pcsc|grep -v grep|awk '{print $1}'`

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.