After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 144833 - displays error messages about mandatory
displays error messages about mandatory
Status: RESOLVED FIXED
Product: gconf-editor
Classification: Applications
Component: general
2.7.x
Other Linux
: High normal
: ---
Assigned To: Gconf Editor Maintainers
Gconf Editor Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-06-22 20:23 UTC by Sebastien Bacher
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GConf2-2.8.0.1-writable-flag.patch (404 bytes, patch)
2004-09-27 14:27 UTC, Mark McLoughlin
none Details | Review
gconf-editor-2.8.0-warnings-on-startup.patch (4.14 KB, patch)
2004-09-27 14:27 UTC, Mark McLoughlin
none Details | Review

Description Sebastien Bacher 2004-06-22 20:23:02 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.
Comment 1 Fernando Herrera 2004-06-23 11:41:25 UTC
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.
Comment 2 Mark McLoughlin 2004-09-27 14:26:56 UTC
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?
Comment 3 Mark McLoughlin 2004-09-27 14:27:26 UTC
Created attachment 31983 [details] [review]
GConf2-2.8.0.1-writable-flag.patch
Comment 4 Mark McLoughlin 2004-09-27 14:27:57 UTC
Created attachment 31984 [details] [review]
gconf-editor-2.8.0-warnings-on-startup.patch
Comment 5 Havoc Pennington 2004-10-03 05:08:05 UTC
It seems like a good plan to me.
Comment 6 Mark McLoughlin 2004-10-04 15:56:41 UTC
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 ?