diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2016-09-29 13:51:44 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2016-09-29 13:51:44 +0300 |
commit | 62f28d30a069135f9c48678507203958adfc334f (patch) | |
tree | 7f38af0c8d3f445ee8cc50906a639baec7011127 /modules/pkgs/mariadb/MDEV-10463.patch | |
parent | 1af9e6589bdd18e6ba7eeabf073aa7d710020cdd (diff) | |
download | nixsap-62f28d30a069135f9c48678507203958adfc334f.tar.gz |
Moved everything into ./modules
Diffstat (limited to 'modules/pkgs/mariadb/MDEV-10463.patch')
-rw-r--r-- | modules/pkgs/mariadb/MDEV-10463.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/pkgs/mariadb/MDEV-10463.patch b/modules/pkgs/mariadb/MDEV-10463.patch new file mode 100644 index 0000000..c094257 --- /dev/null +++ b/modules/pkgs/mariadb/MDEV-10463.patch @@ -0,0 +1,36 @@ +diff --git a/sql/sql_show.cc b/sql/sql_show.cc +index ae38745..73edb18 100644 +--- a/sql/sql_show.cc ++++ b/sql/sql_show.cc +@@ -4850,6 +4850,7 @@ int fill_schema_schemata(THD *thd, TABLE_LIST *tables, COND *cond) + TABLE *table= tables->table; + #ifndef NO_EMBEDDED_ACCESS_CHECKS + Security_context *sctx= thd->security_ctx; ++ ulong db_access= sctx->db_access; + #endif + DBUG_ENTER("fill_schema_shemata"); + +@@ -4891,9 +4892,20 @@ int fill_schema_schemata(THD *thd, TABLE_LIST *tables, COND *cond) + continue; + } + #ifndef NO_EMBEDDED_ACCESS_CHECKS +- if (sctx->master_access & (DB_ACLS | SHOW_DB_ACL) || +- acl_get(sctx->host, sctx->ip, sctx->priv_user, db_name->str, 0) || +- !check_grant_db(thd, db_name->str)) ++ if (test_all_bits(sctx->master_access, DB_ACLS)) ++ db_access= DB_ACLS; ++ else ++ { ++ db_access= acl_get(sctx->host, sctx->ip, sctx->priv_user, db_name->str, FALSE); ++ if (sctx->priv_role[0]) ++ { ++ /* include a possible currently set role for access */ ++ db_access|= acl_get("", "", sctx->priv_role, db_name->str, FALSE); ++ } ++ } ++ if ((sctx->master_access & SHOW_DB_ACL) || ++ (db_access & DB_ACLS) || ++ !check_grant_db(thd, db_name->str)) + #endif + { + load_db_opt_by_name(thd, db_name->str, &create); |