summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2011-04-11 12:55:43 +0200
committerJon Olav Hauglid <jon.hauglid@oracle.com>2011-04-11 12:55:43 +0200
commit25b86591179d4dd1f00e2e3a45c9ac4d3f47be2d (patch)
tree78c2e2ec436b94ae2ec8c6ab3e3d2da5a5efcdbc /sql
parente2125445fd408f467565eb12d7c8eda5f0a81cf0 (diff)
parent7f2ddaa9fead687f5a7490346d1fe0f71e2eb4de (diff)
downloadmariadb-git-25b86591179d4dd1f00e2e3a45c9ac4d3f47be2d.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')
-rw-r--r--sql/sp_head.cc5
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,