summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-08-09 11:32:50 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-08-09 11:32:50 +0300
commit97057115962d9dfbe989c799cff089aec5cbcc60 (patch)
tree55fa1ceccae107e55c0295dfe2174d04d41583fb /sql/table.cc
parent81906cdf3805fe5fcea47fef11945f9adbcef4d8 (diff)
downloadmariadb-git-97057115962d9dfbe989c799cff089aec5cbcc60.tar.gz
WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/sql/table.cc b/sql/table.cc
index bcdfd23b4c1..67f49195b73 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -3786,11 +3786,8 @@ bool TABLE_LIST::prepare_view_securety_context(THD *thd)
{
DBUG_PRINT("info", ("This table is suid view => load contest"));
DBUG_ASSERT(view && view_sctx);
- if (acl_getroot_no_password(view_sctx,
- definer.user.str,
- definer.host.str,
- definer.host.str,
- thd->db))
+ if (acl_getroot(view_sctx, definer.user.str, definer.host.str,
+ definer.host.str, thd->db))
{
if ((thd->lex->sql_command == SQLCOM_SHOW_CREATE) ||
(thd->lex->sql_command == SQLCOM_SHOW_FIELDS))
@@ -3809,10 +3806,15 @@ bool TABLE_LIST::prepare_view_securety_context(THD *thd)
}
else
{
- my_error(ER_ACCESS_DENIED_ERROR, MYF(0),
- thd->security_ctx->priv_user,
- thd->security_ctx->priv_host,
- (thd->password ? ER(ER_YES) : ER(ER_NO)));
+ if (thd->password == 2)
+ my_error(ER_ACCESS_DENIED_NO_PASSWORD_ERROR, MYF(0),
+ thd->security_ctx->priv_user,
+ thd->security_ctx->priv_host);
+ else
+ my_error(ER_ACCESS_DENIED_ERROR, MYF(0),
+ thd->security_ctx->priv_user,
+ thd->security_ctx->priv_host,
+ (thd->password ? ER(ER_YES) : ER(ER_NO)));
}
DBUG_RETURN(TRUE);
}