Package: cryptsetup
Version: 2:2.0.2-1ubuntu1

Dear Maintainers, i propose you my fix to this problem.

I'm using smartcard to decrypt luks disk and to login into my gnome session.
At GDM3 login page, i have this error:
"Error 2304: Error Initializing the PKCS#11 module"

I unplugged my smartcard reader and i plugged it and all works fine.

I search why and i found the problem: The program PSCSD is running twice. First 
one is start by initramfs scripts and the second by GDM3.
I search in initramfs scripts and i found the problem:

In /usr/share/initramfs-tools/scripts/local-top/cryptopensc, PSCSD process is 
start and go in background. But the PID is not store, so i fix it with:
36a37
echo $? > /var/run/pcscd.pid

In /usr/share/initramfs-tools/scripts/local-bottom/cryptopensc, there are 2 
problem:
- First one: the script path is not good
23c23
< if [ ! -e /sbin/pcscd ]; then
---
if [ ! -e /usr/sbin/pcscd ]; then

- Second one: start-stop-daemon is used but in 
/usr/share/initramfs-tools/scripts/local-top/cryptopensc the bloc is commented, 
so i do same in script and i replace it by kill command:
30c30,31
< start-stop-daemon --stop --quiet --pidfile /var/run/pcscd.pid --name pcscd
---
#start-stop-daemon --stop --quiet --pidfile /var/run/pcscd.pid --name pcscd
kill -15 $(cat /var/run/pcscd.pid)
I apply modifications:
update-initramfs -u -k all

So at boot, smartcard reader light is up when initramfs is running. After 
smartcard reader light is down and smartcard reader light is up when GDM3 start.
I can use my smartcard to decrypt my luks disk and to login whithout unplugged 
my smartcard reader.
Regards

Reply via email to