summaryrefslogtreecommitdiff
path: root/packages/mozilla/firefox-3.0.4/random_to_urandom.diff
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2008-11-15 08:02:55 -0200
committerOtavio Salvador <otavio@ossystems.com.br>2008-11-17 13:30:47 -0200
commit3a4f577de022b6d8ae94edd4e730691cef80fb14 (patch)
treeec9bc986bf7561fe7c97e33e6dcbe1f2849621cc /packages/mozilla/firefox-3.0.4/random_to_urandom.diff
parentedccb239325861cc2173373a193e811f51ae3b5a (diff)
firefox: add 3.0.4
Diffstat (limited to 'packages/mozilla/firefox-3.0.4/random_to_urandom.diff')
-rw-r--r--packages/mozilla/firefox-3.0.4/random_to_urandom.diff26
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/mozilla/firefox-3.0.4/random_to_urandom.diff b/packages/mozilla/firefox-3.0.4/random_to_urandom.diff
new file mode 100644
index 0000000000..f969752381
--- /dev/null
+++ b/packages/mozilla/firefox-3.0.4/random_to_urandom.diff
@@ -0,0 +1,26 @@
+# Component manager should not use /dev/random for generation ranodm numbers
+# It cause hangs on embedding platforms,which does not have enough devices for generation required entropy
+# Bug somewhere exists but it is very old
+Index: nsprpub/pr/src/md/unix/uxrng.c
+===================================================================
+--- mozilla/nsprpub/pr/src/md/unix/uxrng.c.orig
++++ mozilla/nsprpub/pr/src/md/unix/uxrng.c
+@@ -144,17 +144,17 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+
+ static int fdDevRandom;
+ static PRCallOnceType coOpenDevRandom;
+
+ static PRStatus OpenDevRandom( void )
+ {
+- fdDevRandom = open( "/dev/random", O_RDONLY );
++ fdDevRandom = open( "/dev/urandom", O_RDONLY );
+ return((-1 == fdDevRandom)? PR_FAILURE : PR_SUCCESS );
+ } /* end OpenDevRandom() */
+
+ static size_t GetDevRandom( void *buf, size_t size )
+ {
+ int bytesIn;
+ int rc;
+