summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott <scott@paragonie.com>2015-09-28 16:36:11 -0400
committerAnatol Belski <ab@php.net>2015-09-29 09:14:30 +0200
commit694b9af5b67d11a09a793056774e3fe8294da5f5 (patch)
tree16d0d18026754993c2a0a59393b799ac9f183a2e
parent46aa628605341d879a685fe683114f8b22d0861f (diff)
downloadphp-git-694b9af5b67d11a09a793056774e3fe8294da5f5.tar.gz
Remove makedev() check.
-rw-r--r--ext/standard/random.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/ext/standard/random.c b/ext/standard/random.c
index cad4d0acbf..6d3ec141bc 100644
--- a/ext/standard/random.c
+++ b/ext/standard/random.c
@@ -145,14 +145,6 @@ static int php_random_bytes(void *bytes, size_t size)
zend_throw_exception(zend_ce_exception, "Error reading from source device", 0);
return FAILURE;
}
-#ifdef __linux__
- // Make sure that /dev/urandom is the proper urandom device on Linux
- if (st.st_rdev != makedev(1, 9)) {
- close(fd);
- zend_throw_exception(zend_ce_exception, "Entropy source device is invalid", 0);
- return FAILURE;
- }
-#endif
RANDOM_G(fd) = fd;
}