diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-05-12 11:35:04 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-05-14 14:30:30 +0100 |
commit | f385324d8b03eab13f3e618ce9a0018977c9a7cb (patch) | |
tree | 84528b88cc370981440f06a6d4592e745c0e2b04 /dbus/dbus-uuidgen.h | |
parent | 49646211f3c8dcdc3728f4059c61c05ef4df857c (diff) | |
download | dbus-f385324d8b03eab13f3e618ce9a0018977c9a7cb.tar.gz |
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>
Diffstat (limited to 'dbus/dbus-uuidgen.h')
-rw-r--r-- | dbus/dbus-uuidgen.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dbus/dbus-uuidgen.h b/dbus/dbus-uuidgen.h index 9d12f2bc..5e4a948c 100644 --- a/dbus/dbus-uuidgen.h +++ b/dbus/dbus-uuidgen.h @@ -41,8 +41,8 @@ dbus_bool_t dbus_internal_do_not_use_ensure_uuid (const char *filename, char **uuid_p, DBusError *error); DBUS_PRIVATE_EXPORT -dbus_bool_t dbus_internal_do_not_use_create_uuid (char **uuid_p); - +dbus_bool_t _dbus_create_uuid (char **uuid_p, + DBusError *error); DBUS_END_DECLS |