1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Security patch to remove wrong error when one had a global update/delete privilige and a database specific SELECT privilege.

sql/sql_acl.cc:
  Security patch
sql/sql_base.cc:
  Security patch
sql/sql_parse.cc:
  Security patch
tests/grant.pl:
  Test of security patch
tests/grant.res:
  Test of security patch
This commit is contained in:
unknown
2003-05-07 23:59:24 +03:00
parent d4b465e2f3
commit a57e773289
5 changed files with 49 additions and 9 deletions

View File

@@ -2118,8 +2118,8 @@ bool check_grant(THD *thd, uint want_access, TABLE_LIST *tables,
}
bool check_grant_column (THD *thd,TABLE *table, const char *name,
uint length, uint show_tables)
bool check_grant_column(THD *thd,TABLE *table, const char *name,
uint length, uint show_tables)
{
GRANT_TABLE *grant_table;
GRANT_COLUMN *grant_column;
@@ -2127,6 +2127,8 @@ bool check_grant_column (THD *thd,TABLE *table, const char *name,
uint want_access=table->grant.want_privilege;
if (!want_access)
return 0; // Already checked
if (!grant_option)
goto err2;
pthread_mutex_lock(&LOCK_grant);
@@ -2158,8 +2160,9 @@ bool check_grant_column (THD *thd,TABLE *table, const char *name,
#endif
/* We must use my_printf_error() here! */
err:
err:
pthread_mutex_unlock(&LOCK_grant);
err2:
if (!show_tables)
{
const char *command="";