From 9718f0b30d38028e801707f64a83685c96d8654e Mon Sep 17 00:00:00 2001 From: Michael Bunk Date: Mon, 9 Feb 2015 12:05:48 +0100 Subject: [PATCH] Remove misguided call to srand() A random number generator needs to be initialized once per process after a fork, but not after each request, more so with an argument that changes only once per second. This fixes SpiderLabs#778 This is a copy of my commit deec149ca363dd14213afd1f9d7f71a71959ef31. --- apache2/modsecurity.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/apache2/modsecurity.c b/apache2/modsecurity.c index da89faa7a2..5bda4cff82 100644 --- a/apache2/modsecurity.c +++ b/apache2/modsecurity.c @@ -237,8 +237,6 @@ static void modsecurity_persist_data(modsec_rec *msr) { } /* Remove stale collections. */ - srand(time(NULL)); - if (rand() < RAND_MAX/100) { arr = apr_table_elts(msr->collections); te = (apr_table_entry_t *)arr->elts;