From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIJ5-0000al-A4 for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUIJ3-0001Z0-9O for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIJ2-0001Yl-UG for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:25 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3MF5OKM011841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Apr 2013 11:05:24 -0400 From: Alon Levy Date: Mon, 22 Apr 2013 18:04:43 +0300 Message-Id: <1366643098-2566-14-git-send-email-alevy@redhat.com> In-Reply-To: <1366643098-2566-1-git-send-email-alevy@redhat.com> References: <1366643098-2566-1-git-send-email-alevy@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3 13/28] libcacard: remove default libcoolkey loading List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mlureau@redhat.com From: Marc-Andr=C3=A9 Lureau Use only the modules defined in the NSS database. --- libcacard/vcard_emul_nss.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index 6b1ca8a..9ba80fb 100644 --- a/libcacard/vcard_emul_nss.c +++ b/libcacard/vcard_emul_nss.c @@ -870,7 +870,7 @@ VCardEmulError vcard_emul_init(const VCardEmulOptions *options) { SECStatus rv; - PRBool ret, has_readers =3D PR_FALSE, need_coolkey_module; + PRBool ret, has_readers =3D PR_FALSE; VReader *vreader; VReaderEmul *vreader_emul; SECMODListLock *module_lock; @@ -983,30 +983,15 @@ vcard_emul_init(const VCardEmulOptions *options) /* make sure we have some PKCS #11 module loaded */ module_lock =3D SECMOD_GetDefaultModuleListLock(); module_list =3D SECMOD_GetDefaultModuleList(); - need_coolkey_module =3D !has_readers; SECMOD_GetReadLock(module_lock); for (mlp =3D module_list; mlp; mlp =3D mlp->next) { SECMODModule *module =3D mlp->module; if (module_has_removable_hw_slots(module)) { - need_coolkey_module =3D PR_FALSE; break; } } SECMOD_ReleaseReadLock(module_lock); =20 - if (need_coolkey_module) { - SECMODModule *module; - module =3D SECMOD_LoadUserModule( - (char *)"library=3Dlibcoolkeypk11.so name=3DCoolkey"= , - NULL, PR_FALSE); - if (module =3D=3D NULL) { - return VCARD_EMUL_FAIL; - } - SECMOD_DestroyModule(module); /* free our reference, Module will= still - * be on the list. - * until we destroy it */ - } - /* now examine all the slots, finding which should be readers */ /* We should control this with options. For now we mirror out any * removable hardware slot */ --=20 1.8.2