scdaemon does not "see" card insertion
Matthias Apitz
guru at unixarea.de
Wed Jul 5 08:08:23 CEST 2017
El día miércoles, julio 05, 2017 a las 09:23:06a. m. +0900, NIIBE Yutaka escribió:
> Hello,
>
> Matthias Apitz <guru at unixarea.de> wrote:
> > The script 'scd-event' is only invoked on card removal (I do just en
> > echo of the args):
> [...]
> > A card insert is only seen *after* some agent requires something, for
> > example the SSH client needs access to the secret key on the card;
>
> Right. Scdaemon only watches the event of card removal and card reader
> removal.
>
> ...
Hello,
Thanks for all explanations. For now I implemented the scd-event script
as:
...
DISPLAY=:0 export DISPLAY
if [ x$status = xNOCARD ]; then
nohup /usr/local/lib/kde4/libexec/kscreenlocker_greet --immediateLock &
while true; do
# Signature key ....: 5E69 FBAC ...
gpg2 --card-status | grep '5E69 FBAC' >> /tmp/scd-event.log && {
killall kscreenlocker_greet
break
}
sleep 1
done
fi
which works nice: on card removal it locks the screen and on card insert
it unlocks it fine.
> > On the UNIX system level the card insert triggers via devd(8) the start
> > of /usr/local/sbin/pcscd and the card removal triggers a 'killall pcscd'.
> > This is working fine, i.e. an inserted card is useable immediately, requesting
> > the PIN entry.
>
> IIUC, system level service like devd can only handle the event of card
> reader insertion, not card insertion. I may be wrong here.
No, you are correct, I was inprecise.
matthias
--
Matthias Apitz, ✉ guru at unixarea.de, ⌂ http://www.unixarea.de/ ☎ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
8. Mai 1945: Wer nicht feiert hat den Krieg verloren.
8 de mayo de 1945: Quien no festeja perdió la Guerra.
May 8, 1945: Who does not celebrate lost the War.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: </pipermail/attachments/20170705/f239484f/attachment.sig>
More information about the Gnupg-users
mailing list