diff options
author | Jeremy Allison <jra@samba.org> | 1998-05-15 00:39:46 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-05-15 00:39:46 +0000 |
commit | d3f507d05df9d0dd313b39bc99ebf11451dc0120 (patch) | |
tree | 340c977ac8a1f8507ca9ea2fbfbf194e7be8ed56 /source/lib | |
parent | 3b8f5aef57b4f37265c0403385053085f0df6f18 (diff) | |
download | samba-d3f507d05df9d0dd313b39bc99ebf11451dc0120.tar.gz samba-d3f507d05df9d0dd313b39bc99ebf11451dc0120.tar.xz samba-d3f507d05df9d0dd313b39bc99ebf11451dc0120.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.
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index e6bf74e56ed..d8249958af3 100644 --- a/source/lib/util.c +++ b/source/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); + } } /******************************************************************* |