Re: 'Machine ID' underspecified?

Zeeshan Ali <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <CAAa3hFNxVb_ki51A3Uf-B3vKuLWmOL5n6soXXYftXbJe=Gou2w@mail.gmail.com>
Hello,

On Sun, 6 Dec 2020 at 15:57, Filipe Laíns <[email protected]> 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
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dbus



-- 
Regards,

Zeeshan Ali
_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.