1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00
Volker Lendecke e73ccc06ef Rely on /dev/urandom
This removes quite a bit of code. All reasonable systems have /dev/urandom
these days. Linux, Solaris and the BSDs do.  In case we find a system
without /dev/urandom, we will have to go hunting in other libraries.

The main reason for this is speed: On Ubuntu 14.04 doing direct reads from
/dev/urandom is 2-3 times faster than our md4 based code. On virtualized
FreeBSD 10 the difference is even larger.

My first approach was to use fopen/fread. It was even faster, but less
than twice as fast. So I thought we could save the additional complexity
when having to deal with throwing away buffers when forking and the
additional memory footprint per process.

With this simple generate_random_buffer it will be easier to adapt new
syscalls to get randomness.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 13 04:25:39 CEST 2015 on sn-devel-104
2015-10-13 04:25:38 +02:00
..
2015-10-13 04:25:38 +02:00
2011-07-14 20:11:22 +02:00
2015-04-08 15:06:26 +02:00
2012-11-07 15:32:24 +01:00
2015-07-01 17:12:48 +02:00
2014-04-02 17:11:37 +02:00
2015-10-13 04:25:38 +02:00
2015-10-13 04:25:38 +02:00
2015-02-24 17:52:09 +01:00
2015-02-24 17:52:08 +01:00
2015-02-26 18:28:31 +01:00
2008-10-12 16:27:00 +02:00
2008-10-12 16:27:00 +02:00
2008-10-18 15:49:11 +02:00
2015-09-30 23:51:13 +02:00
2014-07-22 00:12:24 +02:00
2015-07-07 23:51:23 +02:00
2015-10-13 01:23:07 +02:00
2015-10-13 01:23:07 +02:00
2015-10-13 01:23:07 +02:00
2015-10-13 01:23:07 +02:00
2015-02-13 23:32:07 +01:00
2015-07-07 23:51:23 +02:00
2015-07-07 23:51:23 +02:00
2015-10-01 02:55:21 +02:00
2015-04-27 23:54:27 +02:00
2014-08-14 21:27:13 +02:00
2015-03-24 00:00:20 +01:00
2014-12-07 00:12:07 +01:00
2011-02-10 06:51:07 +01:00
2013-08-12 17:25:49 +12:00
2014-11-18 21:45:40 +01:00
2015-05-07 20:20:19 +02:00
2014-12-16 18:56:03 +01:00
2014-12-16 18:56:03 +01:00
2015-10-13 04:25:38 +02:00

This directory contains libutil (until we can think of a better name)

The idea is that this library contains simple but useful data structures 
and support functions that are generally useful; not just for Samba but for 
other projects as well. Functions here should not depend on any external 
libraries, just on libc (perhaps partially provided by libreplace).