GNOME Bugzilla – Bug 783593
GGtkNotificationBackend should use /org/freedesktop/DBus to call GetNameOwner
Last modified: 2017-06-09 16:25:13 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.
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.
Review of attachment 353458 [details] [review]: Looks good to me.
Comment on attachment 353458 [details] [review] GGtkNotificationBackend: Use correct path for GetNameOwner call Thanks, commited as 34045e66a
Fixed in master for 2.53.3.