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 558619 - PolicyKit helper: make it possible to set a specific value with a dbus API
PolicyKit helper: make it possible to set a specific value with a dbus API
Status: RESOLVED FIXED
Product: GConf
Classification: Deprecated
Component: gconf
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GConf Maintainers
GConf Maintainers
Depends on:
Blocks: 512494
 
 
Reported: 2008-10-31 00:05 UTC by Vincent Untz
Modified: 2009-05-06 03:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (12.27 KB, patch)
2008-10-31 00:09 UTC, Vincent Untz
none Details | Review
Updated patch (12.28 KB, patch)
2008-10-31 16:31 UTC, Vincent Untz
committed Details | Review

Description Vincent Untz 2008-10-31 00:05:54 UTC
Right now, the PK helper is only able to copy some keys from a user gconf db to the system gconf db. That's nice, but there are cases (like bug 512494) where we might want to set a system value without changing the user value.

It turns out we can reuse some serialization functions done for ORBit2 to achieve that easily. Here's a patch. Note that it moves gconf_value_encode/decode to public headers, so it's now public API.
Comment 1 Vincent Untz 2008-10-31 00:09:46 UTC
Created attachment 121703 [details] [review]
Patch

I couldn't test the patch so far, though (I wanted to test it with gconf-editor, but something else in gconf-editor is not working at the moment)
Comment 2 Vincent Untz 2008-10-31 16:31:03 UTC
Created attachment 121732 [details] [review]
Updated patch

There was a typo in the patch (it was always setting mandatory settings). Seems to work okay after some really basic testing.

Any opinion?
Comment 3 Cosimo Cecchi 2008-10-31 18:45:59 UTC
I'm not a GConf maintainer, but the patch seems pretty straightforward to me, as most of the code is similar to the already existing do_copy ().

Just two nitpicks:
- you seem to mix spaces and tabs; GConf uses 8-spaces tabs for indentation.
- the "/* check privileges for each include */" comment in do_set_value () is probably a c/p leftover from do_copy (), because you don't have any includes but only one path.
Comment 4 Matthias Clasen 2009-02-15 06:48:46 UTC
Looks good to me, with the minor fixes pointed out by Cosimo.
Unfortunately, we are already in api freeze, so I guess we should hold off until we are unfrozen.