GNOME Bugzilla – Bug 144833
displays error messages about mandatory
Last modified: 2004-12-22 21:47:04 UTC
I've just installed gconf-editor 2.7.1. When I run it as an user, I got these messages: $ gconf-editor Failed to write "/etc/gconf/gconf.xml.defaults/apps/gconf-editor/%gconf.xml": Failed to open "/etc/gconf/gconf.xml.defaults/apps/gconf-editor/%gconf.xml.new": Permission denied Could not make directory "/etc/gconf/gconf.xml.mandatory/apps": Permission denied Failed to write "/etc/gconf/gconf.xml.mandatory/apps/%gconf.xml": Failed to open "/etc/gconf/gconf.xml.mandatory/apps/%gconf.xml.new": No such file or directory Could not make directory "/etc/gconf/gconf.xml.mandatory/apps": Permission denied Could not make directory "/etc/gconf/gconf.xml.mandatory/apps/gconf-editor": No such file or directory Failed to write "/etc/gconf/gconf.xml.mandatory/apps/gconf-editor/%gconf.xml": Failed to open "/etc/gconf/gconf.xml.mandatory/apps/gconf-editor/%gconf.xml.new": No such file or directory -------- Apparently these message are due to the empty /etc/gconf/gconf.xml.mandatory since an user doesn't have permission to create stuff here.
Yep, I'm aware of this. That's the only way I've found to check if an user can edit mandatory/defaults: trying to directly write a key and if we get an error, he cannot.
See this Fedora bug: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=132164 Okay, the problem here is that gconf-editor has no reliable way of figuring out whether the defaults/mandatory sources are writable by the user. In the markup backend we always assume that the source is writable and just let writes fail - I think this is probably because the tree could be partially writable. So, I think we'd be better off just assuming that the whole tree isn't writable if the toplevel isn't. If so, the GConf patch is simple: @@ -331,6 +331,8 @@ resolve_address (const char *address, if (writable) flags |= GCONF_SOURCE_ALL_WRITEABLE; + else + flags |= GCONF_SOURCE_NEVER_WRITEABLE; and we have sane code for gconf-editor, then. Havoc, any thoughts?
Created attachment 31983 [details] [review] GConf2-2.8.0.1-writable-flag.patch
Created attachment 31984 [details] [review] gconf-editor-2.8.0-warnings-on-startup.patch
It seems like a good plan to me.
GConf patch committed: 2004-10-04 Mark McLoughlin <mark@skynet.ie> GConf part of fix for gconf-editor spewing warnings on startup. See bug #144833. * backends/markup-backend.c: (resolve_address): if the toplevel directory isn't writable, mark the whole source as non-writable. Fer, may I commit the gconf-editor patch ?