1
0
Fork 0

applied patch from #88, option to disable admin authentication

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.2@367 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2007-04-22 02:31:36 +00:00
parent 0065304e99
commit 44428eed6d
2 changed files with 7 additions and 0 deletions

View File

@ -1528,6 +1528,11 @@ static int xcache_admin_auth_check(TSRMLS_D) /* {{{ */
char *admin_pass = NULL;
HashTable *ht;
/* auth disabled, nothing to do.. */
if (!XG(auth_enabled)) {
return 1;
}
if (cfg_get_string("xcache.admin.user", &admin_user) == FAILURE || !admin_user[0]) {
admin_user = NULL;
}
@ -2334,6 +2339,7 @@ PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("xcache.cacher", "1", PHP_INI_ALL, OnUpdateBool, cacher, zend_xcache_globals, xcache_globals)
STD_PHP_INI_BOOLEAN("xcache.stat", "1", PHP_INI_ALL, OnUpdateBool, stat, zend_xcache_globals, xcache_globals)
STD_PHP_INI_BOOLEAN("xcache.enable_auth", "1", PHP_INI_SYSTEM, OnUpdateBool, auth_enabled, zend_xcache_globals, xcache_globals)
#ifdef HAVE_XCACHE_OPTIMIZER
STD_PHP_INI_BOOLEAN("xcache.optimizer", "0", PHP_INI_ALL, OnUpdateBool, optimizer, zend_xcache_globals, xcache_globals)
#endif

View File

@ -14,6 +14,7 @@ ZEND_BEGIN_MODULE_GLOBALS(xcache)
xc_stack_t *var_holds;
time_t request_time;
long var_ttl;
zend_bool auth_enabled;
ZEND_END_MODULE_GLOBALS(xcache)
ZEND_EXTERN_MODULE_GLOBALS(xcache)