[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.19-69-ge8ea109

by NIIBE Yutaka cvs at cvs.gnupg.org
Mon Feb 4 02:31:16 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, STABLE-BRANCH-2-0 has been updated
       via  e8ea10990d9b860d9f2863928887811f86c304b6 (commit)
      from  42dd3956cc59297585c161ff735d89387a34d147 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e8ea10990d9b860d9f2863928887811f86c304b6
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Jan 11 11:18:39 2013 +0900

    SCD: Hold lock for pinpad input.
    
    * scd/apdu.c (apdu_check_keypad, apdu_keypad_verify)
    (apdu_keypad_modify): Hold lock to serialize communication.

diff --git a/scd/apdu.c b/scd/apdu.c
index 962eb71..3c549a3 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -3324,9 +3324,18 @@ apdu_check_keypad (int slot, int command, int pin_mode,
     return SW_HOST_NO_DRIVER;
 
   if (reader_table[slot].check_keypad)
-    return reader_table[slot].check_keypad (slot, command,
+    {
+      int sw;
+
+      if ((sw = lock_slot (slot)))
+        return sw;
+
+      sw = reader_table[slot].check_keypad (slot, command,
                                             pin_mode, pinlen_min, pinlen_max,
                                             pin_padlen);
+      unlock_slot (slot);
+      return sw;
+    }
   else
     return SW_HOST_NOT_SUPPORTED;
 }
@@ -3347,8 +3356,17 @@ apdu_keypad_verify (int slot, int class, int ins, int p0, int p1, int pin_mode,
     return SW_HOST_NO_DRIVER;
 
   if (reader_table[slot].keypad_verify)
-    return reader_table[slot].keypad_verify (slot, class, ins, p0, p1,
+    {
+      int sw;
+
+      if ((sw = lock_slot (slot)))
+        return sw;
+
+      sw = reader_table[slot].keypad_verify (slot, class, ins, p0, p1,
                                              &pininfo);
+      unlock_slot (slot);
+      return sw;
+    }
   else
     return SW_HOST_NOT_SUPPORTED;
 }
@@ -3369,8 +3387,17 @@ apdu_keypad_modify (int slot, int class, int ins, int p0, int p1, int pin_mode,
     return SW_HOST_NO_DRIVER;
 
   if (reader_table[slot].keypad_modify)
-    return reader_table[slot].keypad_modify (slot, class, ins, p0, p1,
+    {
+      int sw;
+
+      if ((sw = lock_slot (slot)))
+        return sw;
+
+      sw = reader_table[slot].keypad_modify (slot, class, ins, p0, p1,
                                              &pininfo);
+      unlock_slot (slot);
+      return sw;
+    }
   else
     return SW_HOST_NOT_SUPPORTED;
 }

-----------------------------------------------------------------------

Summary of changes:
 scd/apdu.c |   33 ++++++++++++++++++++++++++++++---
 1 files changed, 30 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list