cvs: php4 / NEWS /sapi/apache mod_php4.c
| From: | Zeev Suraski | Date: | Wed, 11 Oct 2000 16:24:35 +0000 |
| Subject: | cvs: php4 / NEWS /sapi/apache mod_php4.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1991@lists.php.net to get a copy of this message | ||
zeev Wed Oct 11 09:24:35 2000 EDT
Modified files:
/php4 NEWS
/php4/sapi/apache mod_php4.c
Log:
Fixed a problem that allowed users to override admin_value's and admin_flag's
Index: php4/NEWS
diff -u php4/NEWS:1.464 php4/NEWS:1.465
--- php4/NEWS:1.464 Wed Oct 11 06:32:10 2000
+++ php4/NEWS Wed Oct 11 09:24:34 2000
@@ -2,6 +2,8 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
05 Oct 2000, Version 4.0.3
+- Fixed a problem that allowed users to override admin_value's and admin_flag's
+ (Zeev)
- Fixed PostgreSQL module to work when the link handle is omitted (Zeev)
- Fixed returning of empty LOB fields in OCI8. (Thies)
- Added Calendar module to default Win32 build (Andi)
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.70 php4/sapi/apache/mod_php4.c:1.71
--- php4/sapi/apache/mod_php4.c:1.70 Sat Sep 30 09:11:15 2000
+++ php4/sapi/apache/mod_php4.c Wed Oct 11 09:24:35 2000
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.70 2000/09/30 16:11:15 andi Exp $ */
+/* $Id: mod_php4.c,v 1.71 2000/10/11 16:24:35 zeev Exp $ */
#define NO_REGEX_EXTRA_H
#ifdef WIN32
@@ -548,12 +548,24 @@
}
+static zend_bool should_overwrite_per_dir_entry(php_per_dir_entry *orig_per_dir_entry,
php_per_dir_entry *new_per_dir_entry)
+{
+ if (orig_per_dir_entry->type==PHP_INI_SYSTEM
+ && new_per_dir_entry->type!=PHP_INI_SYSTEM) {
+ return 0;
+ } else {
+ return 1;
+ }
+}
+
+
static void php_destroy_per_dir_info(HashTable *per_dir_info)
{
zend_hash_destroy(per_dir_info);
free(per_dir_info);
}
+
static void *php_create_dir(pool *p, char *dummy)
{
HashTable *per_dir_info;
@@ -570,8 +582,9 @@
{
php_per_dir_entry tmp;
- zend_hash_merge((HashTable *) addv, (HashTable *) basev, (void (*)(void *)) copy_per_dir_entry,
&tmp, sizeof(php_per_dir_entry), 0);
- return addv;
+ zend_hash_merge_ex((HashTable *) basev, (HashTable *) addv, (copy_ctor_func_t) copy_per_dir_entry,
sizeof(php_per_dir_entry), (zend_bool (*)(void *, void *)) should_overwrite_per_dir_entry);
+ /*zend_hash_merge((HashTable *) addv, (HashTable *) basev, (void (*)(void *)) copy_per_dir_entry,
&tmp, sizeof(php_per_dir_entry), 0);*/
+ return basev;
}