summaryrefslogtreecommitdiff
path: root/mysys/default.c
diff options
context:
space:
mode:
authorlenz@mysql.com <>2003-04-23 01:51:26 +0200
committerlenz@mysql.com <>2003-04-23 01:51:26 +0200
commit9d11b35110204123f579890d22990e1de7d50063 (patch)
treee9928ecb2dbb009ea21a5c4e27b48a214c5ed18f /mysys/default.c
parent1d5f8cb79f6ce1000271dd610e7d8d3b128a904d (diff)
downloadmariadb-git-9d11b35110204123f579890d22990e1de7d50063.tar.gz
- Only ignore _regular_ world-writeable files (thanks to Tim Bunce for
discovering this)
Diffstat (limited to 'mysys/default.c')
-rw-r--r--mysys/default.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/default.c b/mysys/default.c
index a3942425b7d..26121cc0e56 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -249,7 +249,8 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
MY_STAT stat_info;
if (!my_stat(name,&stat_info,MYF(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",
name);