Author: abartlet Date: 2004-09-06 02:53:38 +0000 (Mon, 06 Sep 2004) New Revision: 45
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=lorikeet&path=/trunk/heimdal/lib/des&rev=45&nolog=1 Log: Read /dev/urandom first, as this will not block and will always return bytes. Don't read /dev/mem - that idea just gives me the willies... Andrew Bartlett Modified: trunk/heimdal/lib/des/rnd_keys.c Changeset: Modified: trunk/heimdal/lib/des/rnd_keys.c =================================================================== --- trunk/heimdal/lib/des/rnd_keys.c 2004-09-06 02:45:23 UTC (rev 44) +++ trunk/heimdal/lib/des/rnd_keys.c 2004-09-06 02:53:38 UTC (rev 45) @@ -249,10 +249,10 @@ RETSIGTYPE (*ochld)(int); pid_t pid; #endif - char *rnd_devices[] = {"/dev/random", + char *rnd_devices[] = {"/dev/urandom", "/dev/srandom", - "/dev/urandom", "/dev/arandom", + "/dev/random", NULL}; char **p; @@ -266,10 +266,6 @@ close(fd); } - /* Paranoia? Initialize data from /dev/mem if we can read it. */ - if (size >= 8) - sumFile("/dev/mem", (1024*1024*2), data); - gdata = data; gsize = size; igdata = 0;