'Machine ID' underspecified?

Filipe Laíns lains at archlinux.org
Sun Dec 6 14:49:18 UTC 2020


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.

Cheers,
Filipe Laíns
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20201206/ababf1b6/attachment.sig>


More information about the dbus mailing list