'Machine ID' underspecified?

Zeeshan Ali zeeshanak at gnome.org
Sun Dec 6 15:31:52 UTC 2020


Hello,

On Sun, 6 Dec 2020 at 15:57, Filipe Laíns <lains at archlinux.org> wrote:
>
> On Sun, 2020-12-06 at 13:03 +1300, Lawrence D'Oliveiro wrote:
> > On Sat, 05 Dec 2020 15:34:31 +0000, Thomas Kluyver wrote:
> >
> > > The standard org.freedesktop.DBus.Peer interface
> > > (https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-peer
> > > ) defines a GetMachineId method. The spec says that this returns a
> > > UUID which "must be the same for all processes on a single system at
> > > least until that system next reboots."
> > >
> > > ...
> > >
> > > I looked into the code for the reference implementation. On Unix, it
> > > gets the ID from a compile-time configurable file
> > > (/var/lib/dbus/machine-id on my system) with a hardcoded fallback to
> > > /etc/machine-id:
> >
> > Seems like libdbus is going further than the spec requires, by defining
> > a value that persists across reboots. That doesn’t seem to be necessary
> > for the example use cases described in the spec.
>
> Right, but the problem is that the spec forces this UUID to be the same for all
> processes but does not defines how that processes should get that ID.
> So, how should a client exposing an interface get the correct UUID to send if
> there is no standard way to do it? In my implementation I could just mimic what
> libdbus does, but that could effectively change anytime, and might not be what
> other implementations do.

But is that really an issue? Is there a use case of peers connecting
to more than 1 broker? As long as the ID is fixed for the same machine
for the same broker, should there be any problems?

>
> Cheers,
> Filipe Laíns
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dbus



-- 
Regards,

Zeeshan Ali


More information about the dbus mailing list