cvs: ZendEngine2(PHP_5_1) / zend_ini.c
| From: | Dmitry Stogov | Date: | Wed, 06 Sep 2006 08:54:23 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_1) / zend_ini.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5231@lists.php.net to get a copy of this message | ||
dmitry Wed Sep 6 08:54:23 2006 UTC
Modified files: (Branch: PHP_5_1)
/ZendEngine2 zend_ini.c
Log:
Fixed php_admin* bypass by ini_restore()
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.39.2.2&r2=1.39.2.3&diff_format=u
Index: ZendEngine2/zend_ini.c
diff -u ZendEngine2/zend_ini.c:1.39.2.2 ZendEngine2/zend_ini.c:1.39.2.3
--- ZendEngine2/zend_ini.c:1.39.2.2 Wed Jan 4 23:53:04 2006
+++ ZendEngine2/zend_ini.c Wed Sep 6 08:54:23 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini.c,v 1.39.2.2 2006/01/04 23:53:04 andi Exp $ */
+/* $Id: zend_ini.c,v 1.39.2.3 2006/09/06 08:54:23 dmitry Exp $ */
#include "zend.h"
#include "zend_qsort.h"
@@ -256,8 +256,8 @@
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
- if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) {
- return FAILURE;
+ if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE ||
+ (stage == ZEND_INI_STAGE_RUNTIME && (ini_entry->modifiable & ZEND_INI_USER) ==
0)) { return FAILURE;
}
zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC);