]> git.proxmox.com Git - qemu.git/commitdiff
libcacard/vcard_emul_nss: add warning for old coolkey
authorAlon Levy <alevy@redhat.com>
Thu, 22 Mar 2012 18:00:36 +0000 (20:00 +0200)
committerAlon Levy <alevy@redhat.com>
Mon, 26 Mar 2012 16:39:00 +0000 (18:39 +0200)
Older coolkey versions (before the future fix of RHBZ 802435) have
a fake card reader created if no reader is detected during module
initialization. Warn libcacard users if the faulty coolkey is detected
by checking for the fake reader name "E-Gate 0 0".

Signed-off-by: Alon Levy <alevy@redhat.com>
libcacard/vcard_emul_nss.c

index 3703fdcbe964e155b4697d47a49550990eb61147..802cae3a291bc4e0b1e40a520ad467d6e6f067f1 100644 (file)
@@ -1018,6 +1018,16 @@ vcard_emul_init(const VCardEmulOptions *options)
             if (slot == NULL || !PK11_IsRemovable(slot) || !PK11_IsHW(slot)) {
                 continue;
             }
+            if (strcmp("E-Gate 0 0", PK11_GetSlotName(slot)) == 0) {
+                /*
+                 * coolkey <= 1.1.0-20 emulates this reader if it can't find
+                 * any hardware readers. This causes problems, warn user of
+                 * problems.
+                 */
+                fprintf(stderr, "known bad coolkey version - see "
+                        "https://bugzilla.redhat.com/show_bug.cgi?id=802435\n");
+                continue;
+            }
             vreader_emul = vreader_emul_new(slot, options->hw_card_type,
                                             options->hw_type_params);
             vreader = vreader_new(PK11_GetSlotName(slot), vreader_emul,