MXS-1220: Allow admin interface to be disabled

Allowing the admin interface to be disabled completely makes it possible
to remove any security concerns that could arise from its use.
This commit is contained in:
Markus Mäkelä
2017-05-11 12:04:36 +03:00
committed by Markus Mäkelä
parent 39da11763b
commit ca7b24f6fa
4 changed files with 26 additions and 10 deletions

View File

@ -1982,16 +1982,19 @@ int main(int argc, char **argv)
}
}
if (mxs_admin_init())
if (cnf->admin_enabled)
{
MXS_NOTICE("Started REST API on [%s]:%u", cnf->admin_host, cnf->admin_port);
}
else
{
const char* logerr = "Failed to initialize admin interface";
print_log_n_stderr(true, true, logerr, logerr, 0);
rc = MAXSCALE_INTERNALERROR;
goto return_main;
if (mxs_admin_init())
{
MXS_NOTICE("Started REST API on [%s]:%u", cnf->admin_host, cnf->admin_port);
}
else
{
const char* logerr = "Failed to initialize admin interface";
print_log_n_stderr(true, true, logerr, logerr, 0);
rc = MAXSCALE_INTERNALERROR;
goto return_main;
}
}
MXS_NOTICE("MaxScale started with %d server threads.", config_threadcount());