summaryrefslogtreecommitdiff
path: root/sql/sys_vars.cc
diff options
context:
space:
mode:
authorRavinder Thakur <ravinder.thakur@oracle.com>2012-12-13 20:58:09 +0530
committerRavinder Thakur <ravinder.thakur@oracle.com>2012-12-13 20:58:09 +0530
commite604bb8a0300c5b84650d90a01da7088ad7794c5 (patch)
treef81464d5ff0181e73ed47972b92ea2590323f1c7 /sql/sys_vars.cc
parentc85f51f92ab5c28baad9d2ff72dcf9778f9bea4b (diff)
parent2d16c5bd4b6a0fb9f3cd325d0ae8c3805c1ac62c (diff)
downloadmariadb-git-e604bb8a0300c5b84650d90a01da7088ad7794c5.tar.gz
Merging from 5.1 to 5.5 for bug#11761752
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r--sql/sys_vars.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 5a0d2709a52..9e79cdcb6f3 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -2812,6 +2812,14 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
if (!path_length)
return true;
+ if (!is_filename_allowed(var->save_result.string_value.str,
+ var->save_result.string_value.length))
+ {
+ my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0),
+ self->name.str, var->save_result.string_value.str);
+ return true;
+ }
+
MY_STAT f_stat;
if (my_stat(path, &f_stat, MYF(0)))