scd-backport-2-0 branch
NIIBE Yutaka
gniibe at fsij.org
Mon Jun 25 03:30:08 CEST 2012
Thanks for your explanation about scdaemon. I understand the
background.
Let me explain my concern.
There is a use case for Gnuk Token like this:
(1) Use the token for OpenSSH authentication through gpg-agent as ssh-agent
(2) User inserts the token before login
(3) ... and remove the token after authentication
Currently, scdaemon keeps watching (and open and get status). In the
use case above, a user doesn't expect scdaemon keeps watching for
insertion. My concern is that this results shorter battery power life
for laptop.
For the use case above, a patch like following makes sense. The
scdaemon doesn't need to open by itself. Once it will be open by
another foreground thread, it will get status, and keep watching to
detect removal.
diff --git a/scd/command.c b/scd/command.c
index 227057e..a4b3c08 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -2200,11 +2200,6 @@ update_reader_status_file (int set_card_removed_flag)
int idx;
unsigned int status, changed;
- /* Make sure that the reader has been opened. Like get_reader_slot,
- this part of the code assumes that there is only one reader. */
- if (!slot_table[0].valid)
- (void)get_reader_slot ();
-
/* Note, that we only try to get the status, because it does not
make sense to wait here for a operation to complete. If we are
busy working with a card, delays in the status file update should
More information about the Gnupg-devel
mailing list