Make UUID generation failable
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 12 May 2015 10:35:04 +0000 (11:35 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 14 May 2015 13:30:30 +0000 (14:30 +0100)
commitf385324d8b03eab13f3e618ce9a0018977c9a7cb
tree84528b88cc370981440f06a6d4592e745c0e2b04
parent49646211f3c8dcdc3728f4059c61c05ef4df857c
Make UUID generation failable

Previously, this would always succeed, but might use
weak random numbers in rare failure cases. I don't think
these UUIDs are security-sensitive, but if they're generated
by a PRNG as weak as rand() (<= 32 bits of entropy), we
certainly can't claim that they're universally unique.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90414
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
[smcv: document @error]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
bus/bus.c
dbus/dbus-connection.c
dbus/dbus-internals.c
dbus/dbus-internals.h
dbus/dbus-misc.c
dbus/dbus-server.c
dbus/dbus-sysdeps-unix.c
dbus/dbus-uuidgen.c
dbus/dbus-uuidgen.h
tools/dbus-uuidgen.c