summaryrefslogtreecommitdiff
path: root/Zend/zend_ini.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-09-06 08:54:44 +0000
committerDmitry Stogov <dmitry@php.net>2006-09-06 08:54:44 +0000
commit0c3c55edac9a0d27ca0fc829ab34bf9116ef7fca (patch)
treefe7b4b12f67880529cae8389033fb84da467bd4c /Zend/zend_ini.c
parent5d6f6783aed3d79c227eebf4d40d96dd15146fc5 (diff)
downloadphp-git-0c3c55edac9a0d27ca0fc829ab34bf9116ef7fca.tar.gz
Fixed php_admin* bypass by ini_restore()
Diffstat (limited to 'Zend/zend_ini.c')
-rw-r--r--Zend/zend_ini.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index 92bb40e12e..1cade26d6a 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -274,7 +274,8 @@ ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage)
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;
}