diff options
| author | Ben Fuhrmannek | 2016-03-04 10:01:31 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2016-03-04 10:01:31 +0100 |
| commit | 3785bbf9201d52379987b5444967286d2d3e8adc (patch) | |
| tree | 36dd17f70a672fb91c4dc7e07c3c4ffaff8a1a81 | |
| parent | 1b7ec50b72559b21bd9631b74213a34f9d75e830 (diff) | |
.
| -rw-r--r-- | execute.c | 7 | ||||
| -rw-r--r-- | execute.h | 1 | ||||
| -rw-r--r-- | execute_ih.c | 32 | ||||
| -rw-r--r-- | php_suhosin7.h | 2 | ||||
| -rw-r--r-- | suhosin7.c | 2 |
5 files changed, 20 insertions, 24 deletions
| @@ -552,6 +552,7 @@ static suhosin_internal_function_handler ihandlers[] = { | |||
| 552 | // { "preg_replace", ih_preg_replace, NULL, NULL, NULL }, | 552 | // { "preg_replace", ih_preg_replace, NULL, NULL, NULL }, |
| 553 | // { "mail", ih_mail, NULL, NULL, NULL }, | 553 | // { "mail", ih_mail, NULL, NULL, NULL }, |
| 554 | // { "symlink", ih_symlink, NULL, NULL, NULL }, | 554 | // { "symlink", ih_symlink, NULL, NULL, NULL }, |
| 555 | S7_IH_ENTRY0i(symlink) | ||
| 555 | 556 | ||
| 556 | // random number functions | 557 | // random number functions |
| 557 | S7_IH_ENTRY0i(srand) | 558 | S7_IH_ENTRY0i(srand) |
| @@ -560,12 +561,6 @@ static suhosin_internal_function_handler ihandlers[] = { | |||
| 560 | S7_IH_ENTRY0i(mt_rand) | 561 | S7_IH_ENTRY0i(mt_rand) |
| 561 | S7_IH_ENTRY0i(getrandmax) | 562 | S7_IH_ENTRY0i(getrandmax) |
| 562 | S7_IH_ENTRY0("mt_getrandmax", getrandmax) | 563 | S7_IH_ENTRY0("mt_getrandmax", getrandmax) |
| 563 | // { "srand", ih_srand, NULL, NULL, NULL }, | ||
| 564 | // { "mt_srand", ih_mt_srand, NULL, NULL, NULL }, | ||
| 565 | // { "rand", ih_rand, NULL, NULL, NULL }, | ||
| 566 | // { "mt_rand", ih_mt_rand, NULL, NULL, NULL }, | ||
| 567 | // { "getrandmax", ih_getrandmax, NULL, NULL, NULL }, | ||
| 568 | // { "mt_getrandmax", ih_getrandmax, NULL, NULL, NULL }, | ||
| 569 | 564 | ||
| 570 | // { "function_exists", ih_function_exists, NULL, NULL, NULL }, | 565 | // { "function_exists", ih_function_exists, NULL, NULL, NULL }, |
| 571 | 566 | ||
| @@ -20,6 +20,7 @@ typedef struct _suhosin_internal_function_handler { | |||
| 20 | 20 | ||
| 21 | // execute_ih.c | 21 | // execute_ih.c |
| 22 | S7_IH_FUNCTION(preg_replace); | 22 | S7_IH_FUNCTION(preg_replace); |
| 23 | S7_IH_FUNCTION(symlink); | ||
| 23 | 24 | ||
| 24 | // execute_rnd.c | 25 | // execute_rnd.c |
| 25 | S7_IH_FUNCTION(srand); | 26 | S7_IH_FUNCTION(srand); |
diff --git a/execute_ih.c b/execute_ih.c index fa511b9..a59e6c5 100644 --- a/execute_ih.c +++ b/execute_ih.c | |||
| @@ -66,22 +66,22 @@ S7_IH_FUNCTION(preg_replace) | |||
| 66 | // #endif /* SUHOSIN7_PREG_REPLACE_NULL */ | 66 | // #endif /* SUHOSIN7_PREG_REPLACE_NULL */ |
| 67 | 67 | ||
| 68 | 68 | ||
| 69 | // int ih_symlink(IH_HANDLER_PARAMS) | 69 | S7_IH_FUNCTION(symlink) |
| 70 | // { | 70 | { |
| 71 | // if (SUHOSIN7_G(executor_allow_symlink)) { | 71 | if (SUHOSIN7_G(executor_allow_symlink)) { |
| 72 | // return (0); | 72 | return (0); |
| 73 | // } | 73 | } |
| 74 | // | 74 | |
| 75 | // if (PG(open_basedir) && PG(open_basedir)[0]) { | 75 | if (PG(open_basedir) && PG(open_basedir)[0]) { |
| 76 | // suhosin_log(S_EXECUTOR, "symlink called during open_basedir"); | 76 | suhosin_log(S_EXECUTOR, "symlink called during open_basedir"); |
| 77 | // if (!SUHOSIN7_G(simulation)) { | 77 | if (!SUHOSIN7_G(simulation)) { |
| 78 | // RETVAL_FALSE; | 78 | RETVAL_FALSE; |
| 79 | // return (1); | 79 | return (1); |
| 80 | // } | 80 | } |
| 81 | // } | 81 | } |
| 82 | // | 82 | |
| 83 | // return (0); | 83 | return (0); |
| 84 | // } | 84 | } |
| 85 | 85 | ||
| 86 | // int ih_mail(IH_HANDLER_PARAMS) | 86 | // int ih_mail(IH_HANDLER_PARAMS) |
| 87 | // { | 87 | // { |
diff --git a/php_suhosin7.h b/php_suhosin7.h index 7a57fe1..5024790 100644 --- a/php_suhosin7.h +++ b/php_suhosin7.h | |||
| @@ -131,7 +131,7 @@ ZEND_BEGIN_MODULE_GLOBALS(suhosin7) | |||
| 131 | 131 | ||
| 132 | /* executor */ | 132 | /* executor */ |
| 133 | zend_ulong in_code_type; | 133 | zend_ulong in_code_type; |
| 134 | // zend_bool executor_allow_symlink; | 134 | zend_bool executor_allow_symlink; |
| 135 | long execution_depth; | 135 | long execution_depth; |
| 136 | long max_execution_depth; | 136 | long max_execution_depth; |
| 137 | long executor_include_max_traversal; | 137 | long executor_include_max_traversal; |
| @@ -303,7 +303,7 @@ PHP_INI_BEGIN() | |||
| 303 | // STD_S7_INI_BOOLEAN("suhosin.executor.disable_eval", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_disable_eval) | 303 | // STD_S7_INI_BOOLEAN("suhosin.executor.disable_eval", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_disable_eval) |
| 304 | STD_S7_INI_BOOLEAN("suhosin.executor.disable_emodifier", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_disable_emod) | 304 | STD_S7_INI_BOOLEAN("suhosin.executor.disable_emodifier", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_disable_emod) |
| 305 | // | 305 | // |
| 306 | // STD_S7_INI_BOOLEAN("suhosin.executor.allow_symlink", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_allow_symlink) | 306 | STD_S7_INI_BOOLEAN("suhosin.executor.allow_symlink", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_allow_symlink) |
| 307 | STD_S7_INI_ENTRY("suhosin.executor.max_depth", "750", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecLong, max_execution_depth) | 307 | STD_S7_INI_ENTRY("suhosin.executor.max_depth", "750", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecLong, max_execution_depth) |
| 308 | // | 308 | // |
| 309 | // | 309 | // |
