summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2011-04-11 12:38:03 +0200
committerJon Olav Hauglid <jon.hauglid@oracle.com>2011-04-11 12:38:03 +0200
commit82d218d61f7d0811a91b0ff154a67b88239f013a (patch)
tree4cfdd46fb2e7cd9fe545be2749249f2d27a60823 /sql/sp_head.cc
parent16b9088347f5248574e57be77245af55372bb390 (diff)
parent108ad9e44bcc1121a6960fc317bc8643c2150c0c (diff)
downloadmariadb-git-82d218d61f7d0811a91b0ff154a67b88239f013a.tar.gz
Merge from mysql-5.0-security to mysql-5.1-security
Text conflict in sql/sp_head.cc
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 2473abea3c7..19bee87c9ca 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2386,7 +2386,8 @@ 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, 1, TRUE) ||
+ *full_access= ((!check_table_access(thd, SELECT_ACL, &tables, 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,