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.
This commit is contained in:
Michael Bunk 2015-02-09 12:05:48 +01:00 committed by Felipe Zimmerle
parent 4a49d5b8dc
commit f0112604a6

View File

@ -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;