Patchwork [1/2] libcacard: remove sql: prefix

login
register
mail settings
Submitter Marc-André Lureau
Date March 20, 2013, 1:07 p.m.
Message ID <1363784869-23061-1-git-send-email-marcandre.lureau@redhat.com>
Download mbox | patch
Permalink /patch/229378/
State New
Headers show

Comments

Marc-André Lureau - March 20, 2013, 1:07 p.m.
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(-)

Patch

diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c
index 6bad0b9..a0dd32d 100644
--- a/libcacard/vcard_emul_nss.c
+++ b/libcacard/vcard_emul_nss.c
@@ -898,7 +898,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
@@ -910,10 +910,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) {