summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--session.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/session.c b/session.c
index dc78b5f..10c1652 100644
--- a/session.c
+++ b/session.c
@@ -339,7 +339,7 @@ void suhosin_hook_session(TSRMLS_D)
339 339
340 /* increase session identifier entropy */ 340 /* increase session identifier entropy */
341 if (SESSION_G(entropy_length) == 0 || SESSION_G(entropy_file) == NULL) { 341 if (SESSION_G(entropy_length) == 0 || SESSION_G(entropy_file) == NULL) {
342 342#ifndef PHP_WIN32
343 /* ensure that /dev/urandom exists */ 343 /* ensure that /dev/urandom exists */
344 int fd = VCWD_OPEN("/dev/urandom", O_RDONLY); 344 int fd = VCWD_OPEN("/dev/urandom", O_RDONLY);
345 if (fd >= 0) { 345 if (fd >= 0) {
@@ -347,6 +347,7 @@ void suhosin_hook_session(TSRMLS_D)
347 SESSION_G(entropy_length) = 16; 347 SESSION_G(entropy_length) = 16;
348 SESSION_G(entropy_file) = pestrdup("/dev/urandom", 1); 348 SESSION_G(entropy_file) = pestrdup("/dev/urandom", 1);
349 } 349 }
350#endif
350 } 351 }
351} 352}
352 353