Added optional parameters for services that allow all servers to be used when building the list of users.
This commit is contained in:
@ -279,6 +279,7 @@ int error_count = 0;
|
||||
char *user;
|
||||
char *auth;
|
||||
char *enable_root_user;
|
||||
char *auth_all_servers;
|
||||
char *weightby;
|
||||
char *version_string;
|
||||
bool is_rwsplit = false;
|
||||
@ -291,6 +292,9 @@ int error_count = 0;
|
||||
enable_root_user = config_get_value(
|
||||
obj->parameters,
|
||||
"enable_root_user");
|
||||
auth_all_servers = config_get_value(
|
||||
obj->parameters,
|
||||
"auth_all_servers");
|
||||
allow_localhost_match_wildcard_host =
|
||||
config_get_value(obj->parameters,
|
||||
"localhost_match_wildcard_host");
|
||||
@ -353,6 +357,9 @@ int error_count = 0;
|
||||
serviceEnableRootUser(
|
||||
obj->element,
|
||||
config_truth_value(enable_root_user));
|
||||
if(auth_all_servers)
|
||||
serviceAuthAllServers(obj->element,
|
||||
config_truth_value(auth_all_servers));
|
||||
if (weightby)
|
||||
serviceWeightBy(obj->element, weightby);
|
||||
|
||||
@ -1352,6 +1359,7 @@ SERVER *server;
|
||||
char *user;
|
||||
char *auth;
|
||||
char *enable_root_user;
|
||||
char* auth_all_servers;
|
||||
char* max_slave_conn_str;
|
||||
char* max_slave_rlag_str;
|
||||
char *version_string;
|
||||
@ -1363,7 +1371,9 @@ SERVER *server;
|
||||
"user");
|
||||
auth = config_get_value(obj->parameters,
|
||||
"passwd");
|
||||
|
||||
|
||||
auth_all_servers = config_get_value(obj->parameters, "auth_all_servers");
|
||||
|
||||
version_string = config_get_value(obj->parameters, "version_string");
|
||||
|
||||
allow_localhost_match_wildcard_host =
|
||||
@ -1385,7 +1395,8 @@ SERVER *server;
|
||||
auth);
|
||||
if (enable_root_user)
|
||||
serviceEnableRootUser(service, atoi(enable_root_user));
|
||||
|
||||
if(auth_all_servers)
|
||||
serviceAuthAllServers(service, atoi(auth_all_servers));
|
||||
if (allow_localhost_match_wildcard_host)
|
||||
serviceEnableLocalhostMatchWildcardHost(
|
||||
service,
|
||||
@ -1494,7 +1505,8 @@ SERVER *server;
|
||||
char *auth;
|
||||
char *enable_root_user;
|
||||
char *allow_localhost_match_wildcard_host;
|
||||
|
||||
char *auth_all_servers;
|
||||
|
||||
enable_root_user =
|
||||
config_get_value(obj->parameters,
|
||||
"enable_root_user");
|
||||
@ -1517,7 +1529,9 @@ SERVER *server;
|
||||
if (enable_root_user)
|
||||
serviceEnableRootUser(obj->element,
|
||||
atoi(enable_root_user));
|
||||
|
||||
if(auth_all_servers)
|
||||
serviceAuthAllServers(obj->element, atoi(auth_all_servers));
|
||||
|
||||
if (allow_localhost_match_wildcard_host)
|
||||
serviceEnableLocalhostMatchWildcardHost(
|
||||
obj->element,
|
||||
@ -1741,6 +1755,7 @@ static char *service_params[] =
|
||||
"user",
|
||||
"passwd",
|
||||
"enable_root_user",
|
||||
"auth_all_servers",
|
||||
"localhost_match_wildcard_host",
|
||||
"max_slave_connections",
|
||||
"max_slave_replication_lag",
|
||||
|
||||
Reference in New Issue
Block a user