From e55464252822077c0dc04ee3080654d0ec90ddaa Mon Sep 17 00:00:00 2001 From: "jani@ua141d10.elisa.omakaista.fi" <> Date: Tue, 7 Dec 2004 21:57:54 +0200 Subject: [PATCH] Fixed Bug#7043, "SHOW CREATE TABLE security hole". --- sql/sql_parse.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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