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 783593 - GGtkNotificationBackend should use /org/freedesktop/DBus to call GetNameOwner
GGtkNotificationBackend should use /org/freedesktop/DBus to call GetNameOwner
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-06-09 11:44 UTC by Simon McVittie
Modified: 2017-06-09 16:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GGtkNotificationBackend: Use correct path for GetNameOwner call (1.65 KB, patch)
2017-06-09 11:44 UTC, Simon McVittie
committed Details | Review

Description Simon McVittie 2017-06-09 11:44:00 UTC
Created attachment 353458 [details] [review]
GGtkNotificationBackend: Use correct path for GetNameOwner call

For historical reasons, the reference dbus-daemon responds to most
method calls on all object paths. However, the canonical path
of the object implementing the o.fd.DBus interface is
/org/freedesktop/DBus, and in some environments (notably AppArmor
with the <abstractions/dbus-session-strict> abstraction) only this
path is allowed.

https://bugs.freedesktop.org/show_bug.cgi?id=101256 officially
deprecates all other object paths, and when adding new APIs we will
only make them available on the canonical object path.
Comment 1 Simon McVittie 2017-06-09 11:47:40 UTC
One of the reasons we are keen to deprecate this is that it's easy to write security policies (D-Bus XML policies or AppArmor rules or similar) that allow all method calls to /com/example/Foo, on the assumption that only foo will have an object there - but then you've accidentally also opened up access to all method calls that ignore the object path.

For this reason, dbus-daemon already requires that calls to security-sensitive methods like UpdateActivationEnvironment() come in on the /org/freedesktop/DBus path.

The conceptual model of D-Bus (above the message-passing layer) is that connections have objects and objects have interfaces, so it was really rather strange that the dbus-daemon provided the same functionality at every object path.
Comment 2 Emmanuele Bassi (:ebassi) 2017-06-09 12:11:15 UTC
Review of attachment 353458 [details] [review]:

Looks good to me.
Comment 3 Simon McVittie 2017-06-09 16:24:34 UTC
Comment on attachment 353458 [details] [review]
GGtkNotificationBackend: Use correct path for GetNameOwner call

Thanks, commited as 34045e66a
Comment 4 Simon McVittie 2017-06-09 16:25:13 UTC
Fixed in master for 2.53.3.