r1498: (merge from 3.0)
authorAndrew Bartlett <abartlet@samba.org>
Wed, 14 Jul 2004 12:14:07 +0000 (12:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:57:35 +0000 (12:57 -0500)
commitf607197054436a8195e3d0a695fe31574b418059
tree90efd6698cf4cf7a499d7b3307c513b8c85d3690
parent71d28b8265726a50b6f077115e7dacdb8c4b06f8
r1498: (merge from 3.0)

Rework our random number generation system.

On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

This also requires that we start the secrets subsystem, as that is
where the reseed value is stored, for systems without /dev/urandom.

In order to aviod identical streams in forked children, the random
state is re-initialised after the fork(), at the same point were we do
that to the tdbs.

Andrew Bartlett
(This used to be commit b97d3cb2efd68310b1aea8a3ac40a64979c8cdae)
14 files changed:
source4/auth/auth.c
source4/lib/genrand.c
source4/lib/util_uuid.c
source4/libcli/auth/ntlmssp.c
source4/libcli/auth/schannel.c
source4/libcli/util/smbencrypt.c
source4/librpc/rpc/dcerpc_schannel.c
source4/passdb/secrets.c
source4/rpc_server/netlogon/dcerpc_netlogon.c
source4/smbd/process_standard.c
source4/smbd/rewrite.c
source4/torture/rpc/netlogon.c
source4/torture/rpc/samr.c
source4/torture/torture.c