summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-15 00:39:46 +0000
committerJeremy Allison <jra@samba.org>1998-05-15 00:39:46 +0000
commitbc69d08227dae35fc65fafeb4c5263bd5cb45cba (patch)
tree0b61aea8020cc185173e9d6a1d23b54a01681685 /source3/lib
parentf8a4273407f2983bb05a76e914d4f532bbd5004e (diff)
downloadsamba-bc69d08227dae35fc65fafeb4c5263bd5cb45cba.tar.gz
samba-bc69d08227dae35fc65fafeb4c5263bd5cb45cba.tar.bz2
samba-bc69d08227dae35fc65fafeb4c5263bd5cb45cba.zip
util.c: Re-seed the crypto random number generator after a fork, so all
smbds started from the same parent won't use the same sequence. Jeremy. (This used to be commit d3f507d05df9d0dd313b39bc99ebf11451dc0120)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index e6bf74e56e..d8249958af 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -3729,6 +3729,16 @@ void reset_globals_after_fork(void)
{
global_client_name_done = False;
global_client_addr_done = False;
+
+ /*
+ * Re-seed the random crypto generator, so all smbd's
+ * started from the same parent won't generate the same
+ * sequence.
+ */
+ {
+ char dummy;
+ generate_random_buffer( &dummy, 1, True);
+ }
}
/*******************************************************************