mirror of
https://github.com/MariaDB/server.git
synced 2026-04-28 11:15:33 +02:00
Made LOAD DATA LOCAL INFILE more secure
Docs/manual.texi: Changelog sql/sql_yacc.yy: optimization BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
parent
501650c5b1
commit
33d2d76549
13 changed files with 93 additions and 27 deletions
|
|
@ -1796,13 +1796,20 @@ mysql_execute_command(void)
|
|||
{
|
||||
uint privilege= (lex->duplicates == DUP_REPLACE ?
|
||||
INSERT_ACL | UPDATE_ACL | DELETE_ACL : INSERT_ACL);
|
||||
if (!(lex->local_file && (thd->client_capabilities & CLIENT_LOCAL_FILES)))
|
||||
|
||||
if (!lex->local_file)
|
||||
{
|
||||
if (check_access(thd,privilege | FILE_ACL,tables->db))
|
||||
goto error;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(thd->client_capabilities & CLIENT_LOCAL_FILES) ||
|
||||
! opt_local_infile)
|
||||
{
|
||||
send_error(&thd->net,ER_NOT_ALLOWED_COMMAND);
|
||||
goto error;
|
||||
}
|
||||
if (check_access(thd,privilege,tables->db,&tables->grant.privilege) ||
|
||||
grant_option && check_grant(thd,privilege,tables))
|
||||
goto error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue