mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#50373 --secure-file-priv=""
Iterative patch improvement. Previously committed patch caused wrong result on Windows. The previous patch also broke secure_file_priv for symlinks since not all file paths which must be compared against this variable are normalized using the same norm. The server variable opt_secure_file_priv wasn't normalized properly and caused the operations LOAD DATA INFILE .. INTO TABLE .. and SELECT load_file(..) to do different interpretations of the --secure-file-priv option. The patch moves code to the server initialization routines so that the path always is normalized once and only once. It was also intended that setting the option to an empty string should be equal to lifting all previously set restrictions. This is also fixed by this patch.
This commit is contained in:
@ -1832,6 +1832,12 @@ void sql_perror(const char *message);
|
||||
|
||||
bool fn_format_relative_to_data_home(char * to, const char *name,
|
||||
const char *dir, const char *extension);
|
||||
/**
|
||||
Test a file path to determine if the path is compatible with the secure file
|
||||
path restriction.
|
||||
*/
|
||||
bool is_secure_file_path(char *path);
|
||||
|
||||
#ifdef MYSQL_SERVER
|
||||
File open_binlog(IO_CACHE *log, const char *log_file_name,
|
||||
const char **errmsg);
|
||||
|
Reference in New Issue
Block a user