List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:November 10 2009 11:44am
Subject:bzr commit into mysql-5.0-bugteam branch (joro:2845) Bug#32167
View as plain text  
#At file:///home/kgeorge/mysql/work/B32167-5.0-bugteam/ based on revid:joro@stripped

 2845 Georgi Kodinov	2009-11-03
      Bug #32167: another privilege bypass with DATA/INDEX DIRECTORY
      
      Fixed a initialization order remark by Serg : correct directory
      expansion order implemented on server startup.

    modified:
      sql/mysqld.cc
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-10-27 13:11:06 +0000
+++ b/sql/mysqld.cc	2009-11-03 13:49:13 +0000
@@ -7854,14 +7854,8 @@ static void fix_paths(void)
     pos[0]= FN_LIBCHAR;
     pos[1]= 0;
   }
-  convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS);
-  my_realpath(mysql_unpacked_real_data_home, mysql_real_data_home, MYF(0));
-  mysql_unpacked_real_data_home_len= (int) strlen(mysql_unpacked_real_data_home);
-  if (mysql_unpacked_real_data_home[mysql_unpacked_real_data_home_len-1] == FN_LIBCHAR)
-    --mysql_unpacked_real_data_home_len;
-
-
   convert_dirname(language,language,NullS);
+  convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS);
   (void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir
   (void) my_load_path(mysql_real_data_home,mysql_real_data_home,mysql_home);
   (void) my_load_path(pidfile_name,pidfile_name,mysql_real_data_home);
@@ -7869,6 +7863,12 @@ static void fix_paths(void)
                                       "", "");
   opt_plugin_dir_ptr= opt_plugin_dir;
 
+  my_realpath(mysql_unpacked_real_data_home, mysql_real_data_home, MYF(0));
+  mysql_unpacked_real_data_home_len= 
+    (int) strlen(mysql_unpacked_real_data_home);
+  if (mysql_unpacked_real_data_home[mysql_unpacked_real_data_home_len-1] == FN_LIBCHAR)
+    --mysql_unpacked_real_data_home_len;
+
   char *sharedir=get_relative_path(SHAREDIR);
   if (test_if_hard_path(sharedir))
     strmake(buff,sharedir,sizeof(buff)-1);		/* purecov: tested */


Attachment: [text/bzr-bundle] bzr/joro@sun.com-20091103134913-cmp5taffppwxsigr.bundle
Thread
bzr commit into mysql-5.0-bugteam branch (joro:2845) Bug#32167Georgi Kodinov10 Nov