[PATCH 3 of 3] (issue86) Write nss shared db defaults into /etc/skel

Wald Commits scm-commit at wald.intevation.org
Fri Aug 29 18:41:54 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1409330156 -7200
# Node ID ca89cf228a5b82a8aaec6badb57ef42c0d636d98
# Parent  b8ae69bcc5402a9378ec2956e70b83d305ddd54f
(issue86) Write nss shared db defaults into /etc/skel

diff -r b8ae69bcc540 -r ca89cf228a5b cinst/mozilla.c
--- a/cinst/mozilla.c	Fri Aug 29 17:56:06 2014 +0200
+++ b/cinst/mozilla.c	Fri Aug 29 18:35:56 2014 +0200
@@ -82,7 +82,7 @@
 /* Default installation directory of ubuntu 14.4 is respected */
 #define MOZILLA_DEFAULTS "/etc/thunderbird", "/etc/firefox"
 #define NSSSHARED ".pki/nssdb"
-#define NSSSHARED_GLOBAL "/etc/pki/nssdb"
+#define NSSSHARED_GLOBAL "/etc/skel/.pki/nssdb"
 #define TARGET_LINUX 1
 #define DIRSEP "/"
 #else
@@ -408,7 +408,14 @@
     {
 #ifndef _WIN32
       /* NSS Shared db does not exist under windows. */
-      strv_append(&alldirs, NSSSHARED_GLOBAL, strlen(NSSSHARED_GLOBAL));
+      if (!port_mkdir_p(NSSSHARED_GLOBAL))
+        {
+          ERRORPRINTF("Failed to create nssshared skeleton directory. \n");
+        }
+      else
+        {
+          strv_append(&alldirs, "sql:" NSSSHARED_GLOBAL, strlen("sql:" NSSSHARED_GLOBAL));
+        }
 #endif
       pdirs = get_default_profile_dirs();
       if (pdirs != NULL)


More information about the Trustbridge-commits mailing list