Fail to generate random bytes instead of falling back to rand()
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 14 May 2015 11:23:09 +0000 (12:23 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 14 May 2015 13:30:30 +0000 (14:30 +0100)
commitbcdead0fd4642a5e8985981c1583d40ff779299a
tree2285d47c351a1a07bb22f060293f641b711d5785
parentf385324d8b03eab13f3e618ce9a0018977c9a7cb
Fail to generate random bytes instead of falling back to rand()

This is more robust against broken setups where we run out
of memory or cannot read /dev/urandom.

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>
12 files changed:
bus/activation.c
dbus/dbus-auth.c
dbus/dbus-file-unix.c
dbus/dbus-file-win.c
dbus/dbus-internals.c
dbus/dbus-keyring.c
dbus/dbus-nonce.c
dbus/dbus-server-unix.c
dbus/dbus-sysdeps-unix.c
dbus/dbus-sysdeps-win.c
dbus/dbus-sysdeps.c
dbus/dbus-sysdeps.h