1 diff -up ./mozilla/security/nss/lib/sysinit/nsssysinit.c.orig ./mozilla/security/nss/lib/sysinit/nsssysinit.c
2 --- ./mozilla/security/nss/lib/sysinit/nsssysinit.c.orig 2010-06-17 09:17:30.732643399 -0700
3 +++ ./mozilla/security/nss/lib/sysinit/nsssysinit.c 2010-06-17 09:20:22.691642397 -0700
4 @@ -263,9 +263,18 @@ get_list(char *filename, char *stripped_
8 - /* Don't open root's user DB */
9 + /* return a list of databases to open. First the system database. */
11 + const char *readonly = userCanModifySystemDB() ? "" : "flags=readonly";
12 + module_list[next++] = PR_smprintf(
14 + "module=\"NSS system database\" "
15 + "parameters=\"configdir='sql:%s' tokenDescription='NSS system database' %s\" "
16 + "NSS=\"%sflags=internal,critical\"",sysdb, readonly, nssflags);
19 + /* Next the user database, but not for root. */
20 if (userdb != NULL && !userIsRoot()) {
21 - /* return a list of databases to open. First the user Database */
22 module_list[next++] = PR_smprintf(
24 "module=\"NSS User database\" "
25 @@ -284,40 +293,6 @@ get_list(char *filename, char *stripped_
26 userdb, stripped_parameters);
30 - /* This doesn't actually work. If we register
31 - both this and the sysdb (in either order)
32 - then only one of them actually shows up */
34 - /* Using a NULL filename as a Boolean flag to
35 - * prevent registering both an application-defined
36 - * db and the system db. rhbz #546211.
38 - PORT_Assert(filename);
39 - if (sysdb && PL_CompareStrings(filename, sysdb))
41 - else if (userdb && PL_CompareStrings(filename, userdb))
44 - if (filename && !userIsRoot()) {
45 - module_list[next++] = PR_smprintf(
47 - "module=\"NSS database\" "
48 - "parameters=\"configdir='sql:%s' tokenDescription='NSS database sql:%s'\" "
49 - "NSS=\"%sflags=internal\"",filename, filename, nssflags);
53 - /* now the system database (always read only unless it's root) */
55 - const char *readonly = userCanModifySystemDB() ? "" : "flags=readonly";
56 - module_list[next++] = PR_smprintf(
58 - "module=\"NSS system database\" "
59 - "parameters=\"configdir='sql:%s' tokenDescription='NSS system database' %s\" "
60 - "NSS=\"%sflags=internal,critical\"",sysdb, readonly, nssflags);
63 /* that was the last module */
64 module_list[next] = 0;