summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <jani@ua141d10.elisa.omakaista.fi>2004-12-07 21:57:54 +0200
committerunknown <jani@ua141d10.elisa.omakaista.fi>2004-12-07 21:57:54 +0200
commitd74a3faf240023e6f674a502b6915fcccf34c726 (patch)
tree7b719d473ad78099ec96403cb0b9cfc946cb7ce3 /sql/sql_parse.cc
parentac96a2bbcb26cdb20f9ae14d0053773c1fa4a27e (diff)
downloadmariadb-git-d74a3faf240023e6f674a502b6915fcccf34c726.tar.gz
Fixed Bug#7043, "SHOW CREATE TABLE security hole".
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 0e32097266d..73f65449f55 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2600,7 +2600,9 @@ unsent_create_error:
check_access(thd, SELECT_ACL | EXTRA_ACL, tables->db,
&tables->grant.privilege,0,0))
goto error;
- res = mysqld_show_create(thd, tables);
+ if (grant_option && check_grant(thd, SELECT_ACL, tables, 2, UINT_MAX, 0))
+ goto error;
+ res= mysqld_show_create(thd, tables);
break;
}
#endif