From patchwork Mon Apr 22 15:04:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 238596 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 32F8E2C0152 for ; Tue, 23 Apr 2013 01:56:50 +1000 (EST) Received: from localhost ([::1]:55972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIL5-0002jI-JI for incoming@patchwork.ozlabs.org; Mon, 22 Apr 2013 11:07:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIJ3-0000ZD-Ov 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 1UUIJ1-0001Yc-Hr for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIJ1-0001YJ-8a for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:23 -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 r3MF5Mgb011826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Apr 2013 11:05:22 -0400 Received: from localhost.localdomain (vpn1-6-224.ams2.redhat.com [10.36.6.224]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3MF4xGv020026; Mon, 22 Apr 2013 11:05:21 -0400 From: Alon Levy To: qemu-devel@nongnu.org Date: Mon, 22 Apr 2013 18:04:42 +0300 Message-Id: <1366643098-2566-13-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 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r3MF5Mgb011826 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: mlureau@redhat.com Subject: [Qemu-devel] [PATCH v3 12/28] libcacard: remove sql: prefix X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Marc-André Lureau For some reason, with sql:/ prefix, the PKCS11 modules are not loaded. This patch goes on top of Alon smartcard series. --- libcacard/vcard_emul_nss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index 21d4689..6b1ca8a 100644 --- a/libcacard/vcard_emul_nss.c +++ b/libcacard/vcard_emul_nss.c @@ -893,7 +893,7 @@ vcard_emul_init(const VCardEmulOptions *options) if (options->nss_db) { rv = NSS_Init(options->nss_db); } else { - gchar *path, *db; + gchar *path; #ifndef _WIN32 path = g_strdup("/etc/pki/nssdb"); #else @@ -905,10 +905,8 @@ vcard_emul_init(const VCardEmulOptions *options) path = g_build_filename( g_get_system_config_dirs()[0], "pki", "nssdb", NULL); #endif - db = g_strdup_printf("sql:%s", path); - rv = NSS_Init(db); - g_free(db); + rv = NSS_Init(path); g_free(path); } if (rv != SECSuccess) {