From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAmdM-0002PB-C3 for qemu-devel@nongnu.org; Thu, 22 Mar 2012 14:21:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAmdH-0001YU-1I for qemu-devel@nongnu.org; Thu, 22 Mar 2012 14:21:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAmdG-0001Xr-Pu for qemu-devel@nongnu.org; Thu, 22 Mar 2012 14:21:06 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2MIL5K1012535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 22 Mar 2012 14:21:05 -0400 From: Alon Levy Date: Thu, 22 Mar 2012 20:20:59 +0200 Message-Id: <1332440459-17518-4-git-send-email-alevy@redhat.com> In-Reply-To: <1332440459-17518-1-git-send-email-alevy@redhat.com> References: <1332440459-17518-1-git-send-email-alevy@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] libcacard/vcard_emul_nss: add warning for old coolkey List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, rrelyea@redhat.com 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 --- libcacard/vcard_emul_nss.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index 3703fdc..802cae3 100644 --- a/libcacard/vcard_emul_nss.c +++ b/libcacard/vcard_emul_nss.c @@ -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, -- 1.7.9.3