Bug 36190 - Spec clarifications for org.freedesktop.Properties.GetAll
Summary: Spec clarifications for org.freedesktop.Properties.GetAll
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.5
Hardware: All All
: medium normal
Assignee: D-Bus Maintainers
QA Contact: D-Bus Maintainers
URL:
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-04-12 15:25 UTC by David Zeuthen (not reading bugmail)
Modified: 2016-11-22 11:29 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
spec: Clarify behaviour of o.f.D.P.GetAll (2.17 KB, patch)
2016-11-01 04:21 UTC, Philip Withnall
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Zeuthen (not reading bugmail) 2011-04-12 15:25:12 UTC
The spec should clarify what is returned for propertyless interfaces, cf. what Simon says in bug 34869 comment 9. Suggest to return a propertyless interface.

Should probably also clarify what to do when one or more properties wouldn't have been returned by the Get() call because e.g. the sender is not authorized (or any other reason why Get() would fail). Right now the GDBus implementation silenty just skips that property:

 http://git.gnome.org/browse/glib/tree/gio/gdbusconnection.c?id=2.28.5#n4079

which is probably the right behavior. Anyway, need to clarify that.
Comment 1 Simon McVittie 2011-06-27 08:36:56 UTC
See also Bug #22156 which mostly implements your suggestion in dbus-glib.

(In reply to comment #0)
> Should probably also clarify what to do when one or more properties wouldn't
> have been returned by the Get() call because e.g. the sender is not authorized
> (or any other reason why Get() would fail).

dbus-glib doesn't support this case: because g_object_get_property() can't fail, Get() can't fail either (except for silly marshalling-related reasons).

telepathy-glib's TpDBusPropertiesMixin doesn't support this case either: if anyone can read a property, everyone can read it.

If you support this, I think skipping it in GetAll() is OK; but possibly access control should be at (object, interface) granularity, and Get() and GetAll() should both fail for the entire interface?
Comment 2 Philip Withnall 2016-11-01 04:21:44 UTC
Created attachment 127657 [details] [review]
spec: Clarify behaviour of o.f.D.P.GetAll

Clarify its intended behaviour in two situations:
 • For interfaces which have no properties.
 • Where some properties are not visible to the caller (due to access
   control, for example).

The intention here is for this behaviour to be mandatory, but given that
this is quite late on in the specification’s life, and various D-Bus
libraries like dbus-glib and telepathy-glib cannot support access
control at a per-property level, for example. GDBus can, although it’s
questionable whether this is a good idea. Deliberately leave the
specification open to allow access control at a higher level as well
(such as per-(object, interface)).
Comment 3 Philip Withnall 2016-11-01 04:22:10 UTC
In the spirit of resolving old bugs because everyone likes watertight specifications…
Comment 4 Simon McVittie 2016-11-21 12:04:05 UTC
Comment on attachment 127657 [details] [review]
spec: Clarify behaviour of o.f.D.P.GetAll

Review of attachment 127657 [details] [review]:
-----------------------------------------------------------------

I like this patch. Any objections from the other maintainers?
Comment 5 Simon McVittie 2016-11-22 11:29:20 UTC
Fixed in git for spec 0.30 (dbus 1.11.8). Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.