diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2011-04-11 12:55:43 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2011-04-11 12:55:43 +0200 |
commit | 308694c6592b04a6b517997d3542ed081ba66ff2 (patch) | |
tree | 78c2e2ec436b94ae2ec8c6ab3e3d2da5a5efcdbc /sql/sp_head.cc | |
parent | d368bf540c48ce5f888220a8d759135645dbae82 (diff) | |
parent | 82d218d61f7d0811a91b0ff154a67b88239f013a (diff) | |
download | mariadb-git-308694c6592b04a6b517997d3542ed081ba66ff2.tar.gz |
Merge from mysql-5.1-security to mysql-5.5-security
Text conflict in mysql-test/r/sp-security.result
Text conflict in mysql-test/t/sp-security.test
Text conflict in sql/sp_head.cc
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index e87e03c1db7..f568a2d3e68 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2574,8 +2574,9 @@ bool check_show_routine_access(THD *thd, sp_head *sp, bool *full_access) bzero((char*) &tables,sizeof(tables)); tables.db= (char*) "mysql"; tables.table_name= tables.alias= (char*) "proc"; - *full_access= (!check_table_access(thd, SELECT_ACL, &tables, FALSE, - 1, TRUE) || + *full_access= ((!check_table_access(thd, SELECT_ACL, &tables, FALSE, + 1, TRUE) && + (tables.grant.privilege & SELECT_ACL) != 0) || (!strcmp(sp->m_definer_user.str, thd->security_ctx->priv_user) && !strcmp(sp->m_definer_host.str, |