mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
check if write is allowed before writing to error log
This commit is contained in:
parent
5d0a261394
commit
9993892a18
1 changed files with 3 additions and 0 deletions
|
@ -453,6 +453,9 @@ PHPAPI void php_log_err(char *log_message TSRMLS_DC)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (PG(open_basedir) && php_check_open_basedir_ex(PG(error_log), 0 TSRMLS_CC)) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
fd = VCWD_OPEN_MODE(PG(error_log), O_CREAT | O_APPEND | O_WRONLY, 0644);
|
fd = VCWD_OPEN_MODE(PG(error_log), O_CREAT | O_APPEND | O_WRONLY, 0644);
|
||||||
if (fd != -1) {
|
if (fd != -1) {
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue