diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-08-09 13:25:40 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-08-09 13:25:40 +0200 |
commit | 0098d789c9d8be15d62230289f603ac8f3d5b275 (patch) | |
tree | 470c54cd1ca91f5d4758232426b9e430431c3b98 /sql/sys_vars.cc | |
parent | a3f642415a8f8c52ed8a6b38ba5b48f814ab6bd8 (diff) | |
download | mariadb-git-0098d789c9d8be15d62230289f603ac8f3d5b275.tar.gz |
MDEV-10465 general_log_file can be abused
Windows!
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 7d43984c9c0..7b898906184 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -3040,10 +3040,14 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var) return true; static const LEX_CSTRING my_cnf= { STRING_WITH_LEN("my.cnf") }; + static const LEX_CSTRING my_ini= { STRING_WITH_LEN("my.ini") }; if (path_length >= my_cnf.length) { if (strcasecmp(path + path_length - my_cnf.length, my_cnf.str) == 0) return true; // log file name ends with "my.cnf" + DBUG_ASSERT(my_cnf.length == my_ini.length); + if (strcasecmp(path + path_length - my_ini.length, my_ini.str) == 0) + return true; // log file name ends with "my.ini" } MY_STAT f_stat; |