diff cinst/mozilla.c @ 988:ca89cf228a5b

(issue86) Write nss shared db defaults into /etc/skel
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 29 Aug 2014 18:35:56 +0200
parents 66f6361fba1b
children 1cd1bfe82fc2
line wrap: on
line diff
--- 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)

http://wald.intevation.org/projects/trustbridge/