]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Seed glib random generator after fork.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 1 Sep 2014 10:52:52 +0000 (11:52 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 1 Sep 2014 10:59:51 +0000 (11:59 +0100)
src/main.c

index d912eb6a36d073f5869d96c05d2f56e9043cfecd..0083407e7b047ba8b652aadd469726ffac8d8d72 100644 (file)
@@ -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 */