Commit 9d11b351 authored by lenz@mysql.com's avatar lenz@mysql.com

- Only ignore _regular_ world-writeable files (thanks to Tim Bunce for

   discovering this)
parent 1d5f8cb7
...@@ -249,7 +249,8 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc, ...@@ -249,7 +249,8 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
MY_STAT stat_info; MY_STAT stat_info;
if (!my_stat(name,&stat_info,MYF(0))) if (!my_stat(name,&stat_info,MYF(0)))
return 0; return 0;
if (stat_info.st_mode & S_IWOTH) /* ignore world-writeable files */ /* ignore world-writeable _regular_ files */
if (stat_info.st_mode & S_IWOTH && stat_info.st_mode & S_IFREG)
{ {
fprintf(stderr, "warning: World-writeable config file %s is ignored\n", fprintf(stderr, "warning: World-writeable config file %s is ignored\n",
name); name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment