[dovecot-cvs] dovecot/src/auth main.c,1.31,1.32

cras at dovecot.org cras at dovecot.org
Thu Jan 6 21:08:19 EET 2005


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv32424/auth

Modified Files:
	main.c 
Log Message:
Added random_fill_weak() and make random_init() always initialize srand()
with a seed from random_fill().



Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/main.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- main.c	20 Dec 2004 16:00:56 -0000	1.31
+++ main.c	6 Jan 2005 19:08:17 -0000	1.32
@@ -169,8 +169,6 @@
 
 static void drop_privileges(void)
 {
-	unsigned int seed;
-
 	verbose = getenv("VERBOSE") != NULL;
 	verbose_debug = getenv("VERBOSE_DEBUG") != NULL;
 
@@ -178,8 +176,6 @@
 
 	/* Open /dev/urandom before chrooting */
 	random_init();
-	random_fill(&seed, sizeof(seed));
-	srand(seed);
 
 	/* Initialize databases so their configuration files can be readable
 	   only by root. Also load all modules here. */



More information about the dovecot-cvs mailing list