mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix for bug #676
A security leak with SHOW TABLES/ TABLE STATUS FROM db ...
This commit is contained in:
@@ -2171,6 +2171,14 @@ mysql_execute_command(void)
|
||||
}
|
||||
if (check_access(thd,SELECT_ACL,db,&thd->col_access))
|
||||
goto error; /* purecov: inspected */
|
||||
if (!thd->col_access && grant_option && check_grant_db(thd,db))
|
||||
{
|
||||
net_printf(&thd->net,ER_DBACCESS_DENIED_ERROR,
|
||||
thd->priv_user,
|
||||
thd->priv_host,
|
||||
db);
|
||||
goto error;
|
||||
}
|
||||
/* grant is checked in mysqld_show_tables */
|
||||
if (select_lex->options & SELECT_DESCRIBE)
|
||||
res= mysqld_extend_show_tables(thd,db,
|
||||
|
||||
Reference in New Issue
Block a user