diff options
| author | NewEraCracker | 2016-04-08 21:48:59 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2016-08-25 12:34:33 +0200 |
| commit | 64f8d58106dbda0d0cc1d3c0d0d4dd0194ccd7e3 (patch) | |
| tree | 2f97741d6b6af616e3fc6fbd891e2f8a8ccc018a | |
| parent | df6e7140d08c04dded62412269aa16807bbe57f1 (diff) | |
Disable this piece of code in Windows OS
| -rw-r--r-- | session.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -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 | ||
