mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fixed BUG#14834: Server denies to execute Stored Procedure
The problem was that databases with '_' in the name did not match a correct ACL with a literal '_' (i.e. '\_') in the db name, only identical strings matched. The fix makes this work, and also ACLs with wildcards in the db name work. mysql-test/r/sp-security.result: New test case for BUG#14834 mysql-test/t/sp-security.test: New test case for BUG#14834 sql/sql_acl.cc: Match wild db:s in ACL in acl_getroot_no_password() (used for "suid" security context switching when invoking stored routines)
This commit is contained in:
@@ -987,7 +987,7 @@ bool acl_getroot_no_password(Security_context *sctx, char *user, char *host,
|
||||
{
|
||||
if (compare_hostname(&acl_db->host, host, ip))
|
||||
{
|
||||
if (!acl_db->db || (db && !strcmp(acl_db->db, db)))
|
||||
if (!acl_db->db || (db && !wild_compare(db, acl_db->db, 0)))
|
||||
{
|
||||
sctx->db_access= acl_db->access;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user