Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 210

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

autofs-5.0.3 - use /dev/urandom instead of /dev/random

From: Ian Kent <raven@themaw.net>

It has been reported that some headless systems hang when using
/dev/random. It's also been pointed out that /dev/urandom is
sufficient for the needs of autofs.
---

 modules/replicated.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/modules/replicated.c b/modules/replicated.c
index e41713e..362ab1b 100644
--- a/modules/replicated.c
+++ b/modules/replicated.c
@@ -79,7 +79,7 @@ void seed_random(void)
 	int fd;
 	unsigned int seed;
 
-	fd = open("/dev/random", O_RDONLY);
+	fd = open("/dev/urandom", O_RDONLY);
 	if (fd < 0) {
 		srandom(time(NULL));
 		return;