diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-05-14 12:23:09 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-05-14 14:30:30 +0100 |
commit | bcdead0fd4642a5e8985981c1583d40ff779299a (patch) | |
tree | 2285d47c351a1a07bb22f060293f641b711d5785 /bus/activation.c | |
parent | f385324d8b03eab13f3e618ce9a0018977c9a7cb (diff) | |
download | dbus-bcdead0fd4642a5e8985981c1583d40ff779299a.tar.gz |
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>
Diffstat (limited to 'bus/activation.c')
-rw-r--r-- | bus/activation.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bus/activation.c b/bus/activation.c index 390b8362..679a40eb 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -2608,7 +2608,7 @@ bus_activation_service_reload_test (const DBusString *test_data_dir) return FALSE; if (!_dbus_string_append (&directory, "/dbus-reload-test-") || - !_dbus_generate_random_ascii (&directory, 6)) + !_dbus_generate_random_ascii (&directory, 6, NULL)) { return FALSE; } |