cvs: ZendEngine2(PHP_5_2) / zend_ini.c
| From: | Dmitry Stogov | Date: | Wed, 06 Sep 2006 08:54:44 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_2) / zend_ini.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5232@lists.php.net to get a copy of this message | ||
dmitry Wed Sep 6 08:54:44 2006 UTC
Modified files: (Branch: PHP_5_2)
/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.2.2&r2=1.39.2.2.2.3&diff_format=u
Index: ZendEngine2/zend_ini.c
diff -u ZendEngine2/zend_ini.c:1.39.2.2.2.2 ZendEngine2/zend_ini.c:1.39.2.2.2.3
--- ZendEngine2/zend_ini.c:1.39.2.2.2.2 Fri May 19 15:31:25 2006
+++ ZendEngine2/zend_ini.c Wed Sep 6 08:54:44 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini.c,v 1.39.2.2.2.2 2006/05/19 15:31:25 dmitry Exp $ */
+/* $Id: zend_ini.c,v 1.39.2.2.2.3 2006/09/06 08:54:44 dmitry Exp $ */
#include "zend.h"
#include "zend_qsort.h"
@@ -274,7 +274,8 @@
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
- if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==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;
}