Some comments on the D-Bus specification

Thiago Macieira thiago at
Wed Apr 22 17:36:31 PDT 2015

On Wednesday 22 April 2015 18:16:45 Simon McVittie wrote:
> Unique names are, well, unique - they are not recycled, either
> aggressively like fds or gradually like pids. A particular unique
> connection name will be given to at most one connection during the
> lifetime of the dbus-daemon. Clients may (and do) assume that if they
> have seen ":1.42" disappear, it will never return.
> (This means that the dbus-daemon as currently implemented will stop
> working after between 2**63 and 2**64 connections, because it currently
> hands out unique names of the form :n.m where n, m are 32-bit and n > 0.
> The spec does not guarantee this, so we could make unique names longer
> if someone outlines a realistic situation in which 64 bits are not enough.)

The daemon could construct this from other components. For example, it could 
take the monotonic clock's time of the connection and append the peer's PID, 
which would be reasonably "forever" secure, even with reuse of the PIDs.

	Example: :12325.578519.1978

I only used the PID to disambiguate between two connections accepted within 
one monotonic clock's tick. The daemon could use something different if it 
needed to.

Thiago Macieira - thiago (AT) - thiago (AT)
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

More information about the dbus mailing list