[Bug 23630] Per-connection resource randomization increases the window in which you lose messages
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Oct 21 18:38:55 CEST 2009
http://bugs.freedesktop.org/show_bug.cgi?id=23630
Simon McVittie <simon.mcvittie at collabora.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|telepathy- |will.thompson at collabora.co.u
|bugs at lists.freedesktop.org |k
QAContact| |telepathy-
| |bugs at lists.freedesktop.org
Status Whiteboard| |review-
--- Comment #3 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2009-10-21 09:38:55 PST ---
> + /* 32 bytes of hex. The first 8 should be unique enough... */
> + return g_strndup (local_machine_id, 8);
This assumes that the machine ID is uniformly pseudo-random, and therefore any
byte is as good as any other, but the D-Bus spec doesn't guarantee that. It
does note that:
> To generate a UUID, the current reference implementation concatenates 96
> bits of random data followed by the 32-bit time in seconds since the UNIX
> epoch (in big endian byte order).
So, in fact your assumption is right for libdbus, but it needn't be. Perhaps we
should hash the machine ID and use that, in order to mix the pseudo-random and
deterministic parts; also, perhaps telepathy-glib should grow a utility
function to do this?
(IMO libdbus should hash the random number and the time with a 128-bit
algorithm of its choice, and use *that* as the machine ID, and the D-Bus
specification should say that the machine ID is uniformly pseudo-random.
However, it doesn't.)
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list