diff options
Diffstat (limited to 'log.c')
| -rw-r--r-- | log.c | 28 |
1 files changed, 14 insertions, 14 deletions
| @@ -158,22 +158,22 @@ SUHOSIN7_API void suhosin_log(int loglevel, char *fmt, ...) | |||
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | if (zend_is_executing()) { | 160 | if (zend_is_executing()) { |
| 161 | zend_execute_data *exdata = EG(current_execute_data); | 161 | // zend_execute_data *exdata = EG(current_execute_data); |
| 162 | if (exdata) { | 162 | // if (exdata) { |
| 163 | if (getcaller && exdata->prev_execute_data && exdata->prev_execute_data->opline && exdata->prev_execute_data->func) { | 163 | // if (getcaller && exdata->prev_execute_data && exdata->prev_execute_data->opline && exdata->prev_execute_data->func) { |
| 164 | lineno = exdata->prev_execute_data->opline->lineno; | 164 | // lineno = exdata->prev_execute_data->opline->lineno; |
| 165 | fname = (char *)ZSTR_VAL(exdata->prev_execute_data->func->op_array.filename); | 165 | // fname = (char *)ZSTR_VAL(exdata->prev_execute_data->func->op_array.filename); |
| 166 | } else if (exdata->opline && exdata->func) { | 166 | // } else if (exdata->opline && exdata->func) { |
| 167 | lineno = exdata->opline->lineno; | 167 | // lineno = exdata->opline->lineno; |
| 168 | fname = (char *)ZSTR_VAL(exdata->func->op_array.filename); | 168 | // fname = (char *)ZSTR_VAL(exdata->func->op_array.filename); |
| 169 | } else { | 169 | // } else { |
| 170 | lineno = 0; | 170 | // lineno = 0; |
| 171 | fname = "[unknown filename]"; | 171 | // fname = "[unknown filename]"; |
| 172 | } | 172 | // } |
| 173 | } else { | 173 | // } else { |
| 174 | lineno = zend_get_executed_lineno(); | 174 | lineno = zend_get_executed_lineno(); |
| 175 | fname = (char *)zend_get_executed_filename(); | 175 | fname = (char *)zend_get_executed_filename(); |
| 176 | } | 176 | // } |
| 177 | ap_php_snprintf(buf, sizeof(buf), "%s - %s (attacker '%s', file '%s', line %u)", alertstring, error, ip_address, fname, lineno); | 177 | ap_php_snprintf(buf, sizeof(buf), "%s - %s (attacker '%s', file '%s', line %u)", alertstring, error, ip_address, fname, lineno); |
| 178 | } else { | 178 | } else { |
| 179 | fname = suhosin_getenv("SCRIPT_FILENAME", 15); | 179 | fname = suhosin_getenv("SCRIPT_FILENAME", 15); |
