mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Bug#27145 EXTRA_ACL troubles
The flag EXTRA_ACL is used in conjugation with our access checks, yet it is not clear what impact this flag has. This is a code clean up which replaces use of EXTRA_ACL with an explicit function parameter. The patch also fixes privilege checks for: - SHOW CREATE TABLE: The new privilege requirement is any privilege on the table-level. - CHECKSUM TABLE: Requires SELECT on the table level. - SHOW CREATE VIEW: Requires SHOW_VIEW and SELECT on the table level (just as the manual claims) - SHOW INDEX: Requires any privilege on any column combination.
This commit is contained in:
@@ -1120,9 +1120,11 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
||||
bool *write_to_binlog);
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
bool check_access(THD *thd, ulong access, const char *db, ulong *save_priv,
|
||||
bool no_grant, bool no_errors, bool schema_db);
|
||||
bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables,
|
||||
uint number, bool no_errors);
|
||||
bool no_grant, bool no_errors, bool schema_db);
|
||||
bool check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
|
||||
bool any_combination_of_privileges_will_do,
|
||||
uint number,
|
||||
bool no_errors);
|
||||
#else
|
||||
inline bool check_access(THD *thd, ulong access, const char *db,
|
||||
ulong *save_priv, bool no_grant, bool no_errors,
|
||||
@@ -1132,8 +1134,10 @@ inline bool check_access(THD *thd, ulong access, const char *db,
|
||||
*save_priv= GLOBAL_ACLS;
|
||||
return false;
|
||||
}
|
||||
inline bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables,
|
||||
uint number, bool no_errors)
|
||||
inline bool check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
|
||||
bool no_errors,
|
||||
bool any_combination_of_privileges_will_do,
|
||||
uint number)
|
||||
{ return false; }
|
||||
#endif /*NO_EMBEDDED_ACCESS_CHECKS*/
|
||||
|
||||
|
Reference in New Issue
Block a user