Commit 1d967b8d authored by ram@gw.mysql.r18.ru's avatar ram@gw.mysql.r18.ru

A fix (bug #6551: UMASK_DIR & UMASK not taken into account (mysqld.cc my_init.c inconsistency)).

my_umask and my_umask_dir initialization has been moved to the my_init() func.
parent 582f9a89
...@@ -75,6 +75,8 @@ my_bool my_init(void) ...@@ -75,6 +75,8 @@ my_bool my_init(void)
return 0; return 0;
my_init_done=1; my_init_done=1;
mysys_usage_id++; mysys_usage_id++;
my_umask= 0660; /* Default umask for new files */
my_umask_dir= 0700; /* Default umask for new directories */
#if defined(THREAD) && defined(SAFE_MUTEX) #if defined(THREAD) && defined(SAFE_MUTEX)
safe_mutex_global_init(); /* Must be called early */ safe_mutex_global_init(); /* Must be called early */
#endif #endif
......
...@@ -2305,8 +2305,6 @@ bool init_global_datetime_format(timestamp_type format_type, ...@@ -2305,8 +2305,6 @@ bool init_global_datetime_format(timestamp_type format_type,
static int init_common_variables(const char *conf_file_name, int argc, static int init_common_variables(const char *conf_file_name, int argc,
char **argv, const char **groups) char **argv, const char **groups)
{ {
my_umask=0660; // Default umask for new files
my_umask_dir=0700; // Default umask for new directories
umask(((~my_umask) & 0666)); umask(((~my_umask) & 0666));
tzset(); // Set tzname tzset(); // Set tzname
......
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