Browse code

dispatcher: don't initialize the PRNG again, especially with insecure low entropy input

- don't initialize the PRNG again, especially with insecure low entropy input
- this is done in the core for the main process and all children

Henning Westerholt authored on 21/09/2019 22:08:31
Showing 2 changed files
... ...
@@ -537,7 +537,6 @@ void shuffle_uint100array(unsigned int *arr)
537 537
 	int k;
538 538
 	int j;
539 539
 	unsigned int t;
540
-	kam_srand(time(0));
541 540
 	for(j = 0; j < 100; j++) {
542 541
 		k = j + (kam_rand() % (100 - j));
543 542
 		t = arr[j];
... ...
@@ -471,8 +471,6 @@ static int mod_init(void)
471 471
  */
472 472
 static int child_init(int rank)
473 473
 {
474
-	kam_srand((11 + rank) * getpid() * 7);
475
-
476 474
 	return 0;
477 475
 }
478 476