gconf r2767 - in trunk: . defaults gconf



Author: matthiasc
Date: Sun Feb 15 06:45:38 2009
New Revision: 2767
URL: http://svn.gnome.org/viewvc/gconf?rev=2767&view=rev

Log:
        Bug 558490 â New policykit mechanism uses hard-coded gconf path

        * gconf/default.path.in: Add the directory that is used by the
        defaults mechanism

        * defaults/Makefile.am: Define SYSGCONFDIR
        * defaults/gconf-defaults.c: Use SYSGCONFDIR instead of hardcoding
        /etc/gconf. Pointed out by Vincent Untz



Modified:
   trunk/ChangeLog
   trunk/defaults/Makefile.am
   trunk/defaults/gconf-defaults.c
   trunk/gconf/default.path.in

Modified: trunk/defaults/Makefile.am
==============================================================================
--- trunk/defaults/Makefile.am	(original)
+++ trunk/defaults/Makefile.am	Sun Feb 15 06:45:38 2009
@@ -15,6 +15,7 @@
 INCLUDES = \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
+	-DSYSGCONFDIR=\"$(sysgconfdir)\" \
 	$(DEFAULTS_CFLAGS)
 
 gconf_defaults_mechanism_LDADD = \

Modified: trunk/defaults/gconf-defaults.c
==============================================================================
--- trunk/defaults/gconf-defaults.c	(original)
+++ trunk/defaults/gconf-defaults.c	Sun Feb 15 06:45:38 2009
@@ -502,12 +502,12 @@
 	if (mandatory) {
 		annotation_key = "org.gnome.gconf.defaults.set-mandatory.prefix"; 
 		default_action = "org.gnome.gconf.defaults.set-mandatory";
-		dest_address = "xml:merged:/etc/gconf/gconf.xml.mandatory";
+		dest_address = "xml:merged:" SYSGCONFDIR "/gconf.xml.mandatory";
 	}
 	else {
 		annotation_key = "org.gnome.gconf.defaults.set-system.prefix"; 
 		default_action = "org.gnome.gconf.defaults.set-system";
-		dest_address = "xml:merged:/etc/gconf/gconf.xml.system";
+		dest_address = "xml:merged:" SYSGCONFDIR "/gconf.xml.system";
 	}
 
 	for (i = 0; includes[i]; i++) {
@@ -734,7 +734,7 @@
 	}
 
 	error = NULL;
-	unset_in_db (mechanism,"xml:merged:/etc/gconf/gconf.xml.mandatory", 
+	unset_in_db (mechanism, "xml:merged:" SYSGCONFDIR "/gconf.xml.mandatory", 
 		     includes, excludes, &error);
 
 	if (error) {

Modified: trunk/gconf/default.path.in
==============================================================================
--- trunk/gconf/default.path.in	(original)
+++ trunk/gconf/default.path.in	Sun Feb 15 06:45:38 2009
@@ -13,6 +13,9 @@
 # wide sources in this file.
 include @sysgconfdir@/2/local-mandatory.path
 
+# Location for system-wide settings that are set by the defaults mechanism
+xml:readonly:/etc/gconf/gconf.xml.system
+
 # Now see where users want us to look - basically the user can stick arbitrary 
 # sources in a ~/.gconf.path file and they're inserted here
 include "$(HOME)/.gconf.path"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]