Commit 7334a552 authored by serg@serg.mysql.com's avatar serg@serg.mysql.com

Merge bk-internal:/home/bk/mysql-3.23/

into serg.mysql.com:/usr/home/serg/Abk/mysql
parents c231b747 357766ec
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "mysys_priv.h" #include "mysys_priv.h"
#include "m_string.h" #include "m_string.h"
#include "m_ctype.h" #include "m_ctype.h"
#include <my_dir.h>
char *defaults_extra_file=0; char *defaults_extra_file=0;
...@@ -60,13 +61,13 @@ DATADIR, ...@@ -60,13 +61,13 @@ DATADIR,
NullS, NullS,
}; };
#define default_ext ".cnf" /* extension for config file */ #define default_ext ".cnf" /* extension for config file */
#ifdef __WIN__ #ifdef __WIN__
#include <winbase.h> #include <winbase.h>
#define windows_ext ".ini" #define windows_ext ".ini"
#endif #endif
static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc, static my_bool search_default_file(DYNAMIC_ARRAY *args,MEM_ROOT *alloc,
const char *dir, const char *config_file, const char *dir, const char *config_file,
const char *ext, TYPELIB *group); const char *ext, TYPELIB *group);
...@@ -241,6 +242,16 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc, ...@@ -241,6 +242,16 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
{ {
strmov(name,config_file); strmov(name,config_file);
} }
fn_format(name,name,"","",4);
#if !defined(__WIN__) && !defined(OS2)
{
MY_STAT stat_info;
if (!my_stat(name,&stat_info,MYF(MY_WME)))
return 0;
if (stat_info.st_mode & S_IWOTH) /* ignore world-writeable files */
return 0;
}
#endif
if (!(fp = my_fopen(fn_format(name,name,"","",4),O_RDONLY,MYF(0)))) if (!(fp = my_fopen(fn_format(name,name,"","",4),O_RDONLY,MYF(0))))
return 0; /* Ignore wrong files */ return 0; /* Ignore wrong files */
......
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