Browse Source

adds xcache.admin.enable_auth

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@894 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 10 years ago
parent
commit
89d82663c1
  1. 6
      xcache.c
  2. 1
      xcache_globals.h

6
xcache.c

@ -2530,6 +2530,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;
}
@ -3435,6 +3440,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.admin.enable_auth", "1", PHP_INI_SYSTEM, OnUpdateBool, auth_enabled, zend_xcache_globals, xcache_globals)
STD_PHP_INI_BOOLEAN("xcache.experimental", "0", PHP_INI_ALL, OnUpdateBool, experimental, 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)

1
xcache_globals.h

@ -16,6 +16,7 @@ ZEND_BEGIN_MODULE_GLOBALS(xcache)
xc_stack_t *var_holds;
time_t request_time;
long var_ttl;
zend_bool auth_enabled;
zend_llist gc_op_arrays;

Loading…
Cancel
Save