cvs: php-src /main main.c

From: Date: Tue, 10 Jul 2007 18:42:01 +0000
Subject: cvs: php-src /main main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-45186@lists.php.net to get a copy of this message
stas Tue Jul 10 18:42:01 2007 UTC Modified files: /php-src/main main.c Log: check if write is allowed before writing to error log http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.733&r2=1.734&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.733 php-src/main/main.c:1.734 --- php-src/main/main.c:1.733 Tue Jul 3 10:22:55 2007 +++ php-src/main/main.c Tue Jul 10 18:42:01 2007 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.733 2007/07/03 10:22:55 dmitry Exp $ */ +/* $Id: main.c,v 1.734 2007/07/10 18:42:01 stas Exp $ */ /* {{{ includes */ @@ -453,6 +453,9 @@ return; } #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); if (fd != -1) { char *tmp;

« previous php.cvs (#45186) next »