diff options
Diffstat (limited to 'suhosin7.c')
| -rw-r--r-- | suhosin7.c | 14 |
1 files changed, 10 insertions, 4 deletions
| @@ -27,17 +27,14 @@ | |||
| 27 | #include "php.h" | 27 | #include "php.h" |
| 28 | #include "php_ini.h" | 28 | #include "php_ini.h" |
| 29 | #include "SAPI.h" | 29 | #include "SAPI.h" |
| 30 | #include "php_suhosin7.h" | ||
| 31 | #include "suhosin7_logo.h" | 30 | #include "suhosin7_logo.h" |
| 32 | #include "ext/standard/base64.h" | 31 | #include "ext/standard/base64.h" |
| 33 | #include "ext/standard/info.h" | 32 | #include "ext/standard/info.h" |
| 33 | #include "php_suhosin7.h" | ||
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | ZEND_DECLARE_MODULE_GLOBALS(suhosin7) | 36 | ZEND_DECLARE_MODULE_GLOBALS(suhosin7) |
| 37 | 37 | ||
| 38 | /* True global resources - no need for thread safety here */ | ||
| 39 | // static int le_suhosin7; | ||
| 40 | |||
| 41 | /* ------------------------------------------------------------------------ */ | 38 | /* ------------------------------------------------------------------------ */ |
| 42 | /* PERDIR CHECKS */ | 39 | /* PERDIR CHECKS */ |
| 43 | #define PERDIR_CHECK(lower) \ | 40 | #define PERDIR_CHECK(lower) \ |
| @@ -449,6 +446,11 @@ char *suhosin_getenv(char *name, size_t name_len) | |||
| 449 | */ | 446 | */ |
| 450 | static void php_suhosin7_init_globals(zend_suhosin7_globals *suhosin7_globals) | 447 | static void php_suhosin7_init_globals(zend_suhosin7_globals *suhosin7_globals) |
| 451 | { | 448 | { |
| 449 | SDEBUG("."); | ||
| 450 | #if defined(COMPILE_DL_SUHOSIN7) && defined(ZTS) | ||
| 451 | ZEND_TSRMLS_CACHE_UPDATE(); | ||
| 452 | #endif | ||
| 453 | |||
| 452 | memset(suhosin7_globals, 0, sizeof(zend_suhosin7_globals)); | 454 | memset(suhosin7_globals, 0, sizeof(zend_suhosin7_globals)); |
| 453 | } | 455 | } |
| 454 | /* }}} */ | 456 | /* }}} */ |
| @@ -540,6 +542,10 @@ PHP_MSHUTDOWN_FUNCTION(suhosin7) | |||
| 540 | PHP_RINIT_FUNCTION(suhosin7) | 542 | PHP_RINIT_FUNCTION(suhosin7) |
| 541 | { | 543 | { |
| 542 | SDEBUG("(RINIT)"); | 544 | SDEBUG("(RINIT)"); |
| 545 | #if defined(COMPILE_DL_SUHOSIN7) && defined(ZTS) | ||
| 546 | ZEND_TSRMLS_CACHE_UPDATE(); | ||
| 547 | #endif | ||
| 548 | |||
| 543 | SUHOSIN7_G(in_code_type) = SUHOSIN_NORMAL; | 549 | SUHOSIN7_G(in_code_type) = SUHOSIN_NORMAL; |
| 544 | SUHOSIN7_G(execution_depth) = 0; | 550 | SUHOSIN7_G(execution_depth) = 0; |
| 545 | 551 | ||
