1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-5232 SET ROLE checks privileges differently from check_access()

use the same inconsistent priv_user@host pair for SET ROLE privilege checks,
just as check_access() does
This commit is contained in:
Sergei Golubchik
2013-11-04 13:37:39 +01:00
parent 00ba619106
commit 79d2e6c82f
3 changed files with 38 additions and 1 deletions

View File

@ -1871,7 +1871,9 @@ int acl_check_setrole(THD *thd, char *rolename, ulonglong *access)
continue;
acl_user= (ACL_USER *)acl_user_base;
if (acl_user->wild_eq(thd->security_ctx->user, thd->security_ctx->host))
/* Yes! priv_user@host. Don't ask why - that's what check_access() does. */
if (acl_user->wild_eq(thd->security_ctx->priv_user,
thd->security_ctx->host))
{
is_granted= TRUE;
break;