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 678105 - user-accounts: Update the realmd dbus interface to latest
user-accounts: Update the realmd dbus interface to latest
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: User Accounts
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-14 15:14 UTC by Stef Walter
Modified: 2012-06-22 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user-accounts: Update the realmd dbus interface to latest (5.18 KB, patch)
2012-06-14 15:14 UTC, Stef Walter
reviewed Details | Review
user-accounts: Update the realmd dbus interface to latest (8.27 KB, patch)
2012-06-15 16:45 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2012-06-14 15:14:27 UTC
The changes in the realmd dbus interface are futureproofing to
support cancellation. More details in realmd Git log:

http://cgit.freedesktop.org/~stefw/realmd/commit/?id=af92a2df67bc2db863561b3302377728e48b1f75
Comment 1 Stef Walter 2012-06-14 15:14:30 UTC
Created attachment 216420 [details] [review]
user-accounts: Update the realmd dbus interface to latest

The changes in the realmd dbus interface are futureproofing to
support cancellation.
Comment 2 Matthias Clasen 2012-06-14 17:59:43 UTC
Review of attachment 216420 [details] [review]:

Wait, the client provides the unique id ? That seems suboptimal to me, wouldn't you expect the service to hand them out ? Otherwise, you get new error conditions where clients may provide non-unique ids, or even separation problems where clients ids may clash...
Comment 3 Stef Walter 2012-06-15 05:00:31 UTC
The service tracks the operation_id + the caller's unique dbus name. 

This is similar to GCancellable, where the caller passes in the cancellable. Later I'll add something like a CancelOperation method which accepts a unique name.

Polkit does something similar. See CheckAuthorization and CancelCheckAuthorization: http://hal.freedesktop.org/docs/polkit/eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization

Having the server provided jobs or transactions is complicated to do correctly in a non-racy manner, and not something I want to get into for realmd.
Comment 4 Matthias Clasen 2012-06-15 12:03:38 UTC
maybe I misunderstood what you meant by 'unique' then - it is just unique per-client. Thats more reasonable, ok.
Comment 5 Stef Walter 2012-06-15 16:45:16 UTC
Created attachment 216532 [details] [review]
user-accounts: Update the realmd dbus interface to latest

The changes in the realmd dbus interface are futureproofing to
support cancellation.

In addition during this time of interface flux, check the
daemon version number to make sure we can talk to it.
Comment 6 Matthias Clasen 2012-06-20 01:01:56 UTC
Review of attachment 216532 [details] [review]:

::: panels/user-accounts/data/org.freedesktop.realmd.xml
@@ +21,3 @@
+		 * A version number for the provider
+		-->
+		<property name="Version" type="s" access="read"/>

Not a big deal, but you could just as well make this (dd) and save the parsing ?
Comment 7 Stef Walter 2012-06-22 08:09:26 UTC
(In reply to comment #6)
> Review of attachment 216532 [details] [review]:
> 
> ::: panels/user-accounts/data/org.freedesktop.realmd.xml
> @@ +21,3 @@
> +         * A version number for the provider
> +        -->
> +        <property name="Version" type="s" access="read"/>
> 
> Not a big deal, but you could just as well make this (dd) and save the parsing
> ?

Because long term I want this property to be informational. I think we should only use it in gnome-control-center during the development process. Once the interface stabilizes, we'll no longer need to check this.

Also (but less important) would like to support arbitrary version numbers.
Comment 8 Matthias Clasen 2012-06-22 11:29:26 UTC
Review of attachment 216532 [details] [review]:

Fine with me, then.