Merge branch 'develop' of github.com:mariadb-corporation/MaxScale into develop

This commit is contained in:
Timofey Turenko 2019-05-23 11:29:32 +03:00
commit e0c5791a6e
3 changed files with 15 additions and 5 deletions

View File

@ -110,10 +110,8 @@ enum mxs_module_param_options
MXS_MODULE_OPT_PATH_CREAT = (1 << 5), /**< PATH: Create path if it doesn't exist */
MXS_MODULE_OPT_ENUM_UNIQUE = (1 << 6), /**< ENUM: Only one value can be defined */
MXS_MODULE_OPT_DURATION_S = (1 << 7), /**< DURATION: Cannot be specified in milliseconds */
/**< Parameter is deprecated: Causes a warning to be logged if the parameter
* is used but will not cause a configuration error. */
MXS_MODULE_OPT_DEPRECATED = (1 << 7),
MXS_MODULE_OPT_DEPRECATED = (1 << 8), /**< Parameter is deprecated: Causes a warning to be logged if the
* parameter is used but will not cause a configuration error. */
};
/** String to enum value mappings */

View File

@ -1057,6 +1057,16 @@ bool runtime_create_listener(Service* service,
proto = "mariadbclient";
}
if (auth && strcasecmp(auth, CN_DEFAULT) == 0)
{
// The protocol default authenticator is used
auth = nullptr;
}
if (auth_opt && strcasecmp(auth_opt, CN_DEFAULT) == 0)
{
auth_opt = nullptr;
}
MXS_CONFIG_PARAMETER params;
bool ok;
tie(ok, params) = load_defaults(proto, MODULE_PROTOCOL, CN_LISTENER);

View File

@ -824,8 +824,10 @@ static bool check_default_table_permissions(MYSQL* mysql,
for (MYSQL_ROW row = mysql_fetch_row(res); row; row = mysql_fetch_row(res))
{
if (strcasestr(row[0], "SHOW DATABASES"))
if (strcasestr(row[0], "SHOW DATABASES") || strcasestr(row[0], "ALL PRIVILEGES ON *.*"))
{
// GRANT ALL PRIVILEGES ON *.* will overwrite SHOW DATABASES so it needs to be checked
// separately
found = true;
break;
}