MF5: fix for access control with .htaccess

This commit is contained in:
Stanislav Malyshev 2007-08-03 01:40:05 +00:00
parent c54e9706fd
commit d4cc7daba2
7 changed files with 29 additions and 9 deletions

View file

@ -76,6 +76,7 @@ typedef struct _php_per_dir_entry {
uint key_length;
uint value_length;
int type;
char htaccess;
} php_per_dir_entry;
/* some systems are missing these from their header files */
@ -540,7 +541,7 @@ static void init_request_info(TSRMLS_D)
*/
static int php_apache_alter_ini_entries(php_per_dir_entry *per_dir_entry TSRMLS_DC)
{
zend_alter_ini_entry(per_dir_entry->key, per_dir_entry->key_length+1, per_dir_entry->value, per_dir_entry->value_length, per_dir_entry->type, PHP_INI_STAGE_ACTIVATE);
zend_alter_ini_entry(per_dir_entry->key, per_dir_entry->key_length+1, per_dir_entry->value, per_dir_entry->value_length, per_dir_entry->type, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE);
return 0;
}
/* }}} */
@ -776,6 +777,7 @@ static CONST_PREFIX char *php_apache_value_handler_ex(cmd_parms *cmd, HashTable
php_apache_startup(&apache_sapi_module);
}
per_dir_entry.type = mode;
per_dir_entry.htaccess = ((cmd->override & (RSRC_CONF|ACCESS_CONF)) == 0);
if (strcasecmp(arg2, "none") == 0) {
arg2 = "";