diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-09-01 11:52:52 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-09-01 11:59:51 +0100 |
commit | 4d2ab5cc17f4da8f23a5eaad9aede8933939ddd3 (patch) | |
tree | beb688d6d572c8fa0d8cf878519be0c335dda37e | |
parent | c738d64d897f85359ea0b142ebb7f3b4ec39f69f (diff) | |
download | rspamd-4d2ab5cc17f4da8f23a5eaad9aede8933939ddd3.tar.gz rspamd-4d2ab5cc17f4da8f23a5eaad9aede8933939ddd3.zip |
Seed glib random generator after fork.
-rw-r--r-- | src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index d912eb6a3..0083407e7 100644 --- a/src/main.c +++ b/src/main.c @@ -504,7 +504,9 @@ fork_worker (struct rspamd_main *rspamd, struct rspamd_worker_conf *cf) update_log_pid (cf->type, rspamd->logger); /* Lock statfile pool if possible */ statfile_pool_lockall (rspamd->statfile_pool); + /* Init PRNG after fork */ ottery_init (NULL); + g_random_set_seed (ottery_rand_uint32 ()); /* Drop privilleges */ drop_priv (rspamd); /* Set limits */ |