1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source4/smbd
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
..
process_model.c Revert making public of the samba-module library. 2011-12-03 08:36:30 +01:00
process_model.h s4-server: cleanup allocation of process models 2010-11-03 10:40:52 +00:00
process_single.c s4-process_single: Use pid,task_id as cluster_id in process_single just like process_prefork 2013-01-26 16:13:04 +01:00
process_standard.c Rely on /dev/urandom 2015-10-13 04:25:38 +02:00
server.c Rely on /dev/urandom 2015-10-13 04:25:38 +02:00
service_named_pipe.c lib: directory_create_or_exist() does not use "uid" parameter 2014-07-28 22:04:13 +02:00
service_stream.c lib: Remove server_id_str() 2015-04-28 20:48:01 +02:00
service_stream.h server_id.idl: Bring server_id.idl in common 2011-06-09 12:40:08 +02:00
service_task.c s4:service_task: explicitly use dcerpc_binding_handle_set_sync_ev() for irpc 2014-05-13 00:08:12 +02:00
service_task.h server_id.idl: Bring server_id.idl in common 2011-06-09 12:40:08 +02:00
service.c s4-smbd: don't initialise process models more than once 2010-10-30 23:49:00 +11:00
service.h
wscript_build s4-process_model: Remove prefork and onefork 2015-03-16 03:00:07 +01:00