File php-5.1.2-ini_restore-secfix.patch of Package php
Index: Zend/zend_ini.c
===================================================================
RCS file: /repository/ZendEngine2/zend_ini.c,v
retrieving revision 1.39.2.2
retrieving revision 1.39.2.3
diff -u -r1.39.2.2 -r1.39.2.3
--- Zend/zend_ini.c 4 Jan 2006 23:53:04 -0000 1.39.2.2
+++ Zend/zend_ini.c 6 Sep 2006 08:54:23 -0000 1.39.2.3
@@ -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);