[patch] Mention /org/freedesktop/DBus/Local in the spec

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Apr 26 05:27:28 PDT 2007


On Wed, 21 Feb 2007 at 17:37:14 +0000, Simon McVittie wrote:
> On Wed, 21 Feb 2007 at 12:18:49 -0500, John (J5) Palmieri wrote:
> > On Wed, 2007-02-21 at 15:30 +0000, Simon McVittie wrote:
> > > Looking at the message validation code, it seems that this object path
> > > is somehow reserved, and the bus daemon will respond to any message with
> > > this in its object path header field by kicking the process that sent it
> > > off the bus.
> > > 
> > > Since object paths are local to a service, having globally reserved
> > > object paths seems rather broken - as far as I'm aware, the only
> > > significance of Local is that the Disconnected signal comes from the
> > > pseudo-bus-name org.freedesktop.DBus.Local, path
> > > /org/freedesktop/DBus/Local. The pseudo-bus-name is enough to
> > > identify messages mistakenly sent to Local, the object path surely
> > > doesn't need to be reserved too...
> > 
> > The reason why you are kicked off the bus is that D-Bus assumes you are
> > trying to spoof the bus.  It is reserved by the libdbus and should not
> > be used.  We should add it to the spec.  Basically
> > org.freedesktop.DBus.Local and /org/freedesktop/DBus/Local signify that
> > the message is coming from the application itself.

I'm revisiting libdbus at the moment as part of some work on making
peer-to-peer connections useful (there are three main cases I now want
to support - a real bus daemon, a two-participant peer-to-peer
connection, and a pseudo-bus like the one created by Telepathy's Tubes
protocol, which has unique names but no bus daemon or well-known names).

I'll probably be sending in more spec patches as I refactor dbus-python
to isolate the bus-related code.

It appears I'd misunderstood the Local stuff - I'd thought the
Disconnected message was from a pseudo-bus-name
org.freedesktop.DBus.Local, but in fact it comes from an unspecified bus
name with interface org.freedesktop.DBus.Local and object-path
/org/freedesktop/DBus/Local.

I suggest clarifying the spec to reserve these names and forbid sending
them on the bus or to a peer, while not stating how they are used internally
since this is a libdbus implementation detail. A patch follows.
Comments?

Regards,
-- 
Simon McVittie, Collabora Ltd.: http://www.collabora.co.uk/

Index: doc/dbus-specification.xml
===================================================================
RCS file: /cvs/dbus/dbus/doc/dbus-specification.xml,v
retrieving revision 1.48
diff -u -r1.48 dbus-specification.xml
--- doc/dbus-specification.xml	15 Nov 2006 01:52:01 -0000	1.48
+++ doc/dbus-specification.xml	26 Apr 2007 11:21:13 -0000
@@ -921,8 +921,13 @@
                   <entry>1</entry>
                   <entry><literal>OBJECT_PATH</literal></entry>
                   <entry><literal>METHOD_CALL</literal>, <literal>SIGNAL</literal></entry>
-                  <entry>The object to send a call to, 
+                  <entry>The object to send a call to,
                     or the object a signal is emitted from.
+                    The special path
+                    <literal>/org/freedesktop/DBus/Local</literal> is reserved;
+                    implementations should not send messages with this path,
+                    and the reference implementation of the bus daemon will
+                    disconnect any application that attempts to do so.
                   </entry>
                 </row>
                 <row>
@@ -934,6 +939,12 @@
                     The interface to invoke a method call on, or 
                     that a signal is emitted from. Optional for 
                     method calls, required for signals.
+                    The special interface
+                    <literal>org.freedesktop.DBus.Local</literal> is reserved;
+                    implementations should not send messages with this
+                    interface, and the reference implementation of the bus
+                    daemon will disconnect any application that attempts to
+                    do so.
                   </entry>
                 </row>
                 <row>


More information about the dbus mailing list