List:Commits« Previous MessageNext Message »
From:Ashish Agarwal Date:May 18 2012 3:37pm
Subject:bzr push into mysql-trunk branch (ashish.y.agarwal:3890 to 3891)
View as plain text  
 3891 Ashish Agarwal	2012-05-18
      wl2739: Auditing Password Security
              Implementing code review.

    modified:
      include/mysql/plugin_validate_password.h
      mysql-test/t/validate_password_plugin.test
      plugin/password_validation/validate_password.cc
      sql/string_service.cc
      sql/string_service.h
 3890 Ashish Agarwal	2012-05-18
      wl2739: Auditing Password Security
              Implementing suggestions.

    modified:
      mysql-test/r/validate_password_plugin.result
      sql/sql_acl.cc
      sql/string_service.cc
      sql/string_service.h
=== modified file 'include/mysql/plugin_validate_password.h'
--- a/include/mysql/plugin_validate_password.h	2012-05-18 06:31:26 +0000
+++ b/include/mysql/plugin_validate_password.h	2012-05-18 15:35:54 +0000
@@ -21,8 +21,6 @@
 #include <mysql/plugin.h>
 #define MYSQL_VALIDATE_PASSWORD_INTERFACE_VERSION 0x0100
 
-typedef void *mysql_string_handle;
-
 /*  
   The descriptor structure for the plugin, that is referred from
   st_mysql_plugin.

=== modified file 'mysql-test/t/validate_password_plugin.test'
--- a/mysql-test/t/validate_password_plugin.test	2012-05-18 06:31:26 +0000
+++ b/mysql-test/t/validate_password_plugin.test	2012-05-18 15:35:54 +0000
@@ -1,5 +1,5 @@
---source include/have_validate_password_plugin.inc
 --source include/not_embedded.inc
+--source include/have_validate_password_plugin.inc
 
 let $MYSQL_ERRMSG_BASEDIR=`select @@lc_messages_dir`;
 

=== modified file 'plugin/password_validation/validate_password.cc'
--- a/plugin/password_validation/validate_password.cc	2012-05-18 06:31:26 +0000
+++ b/plugin/password_validation/validate_password.cc	2012-05-18 15:35:54 +0000
@@ -105,8 +105,7 @@ static int validate_dictionary_check(mys
   int length;
   int error= 0;
   char *buffer;
-  mysql_string_handle lower_string_handle;
-  lower_string_handle= mysql_string_to_lowercase(password);
+  mysql_string_handle lower_string_handle= mysql_string_to_lowercase(password);
   if (!(buffer= (char*) malloc(MAX_PASSWORD_LENGTH)))
     return (0);
 

=== modified file 'sql/string_service.cc'
--- a/sql/string_service.cc	2012-05-18 12:25:01 +0000
+++ b/sql/string_service.cc	2012-05-18 15:35:54 +0000
@@ -132,7 +132,7 @@ extern "C"
 mysql_string_handle mysql_string_to_lowercase(mysql_string_handle string_handle)
 {
   String *str= (String *) string_handle;
-  uint len= str->length();
+  uint len= 0;
   const CHARSET_INFO *cs= str->charset();
 
   if (cs->casedn_multiply == 1)
@@ -143,8 +143,8 @@ mysql_string_handle mysql_string_to_lowe
   }
   else
   {
-    len= len * cs->casedn_multiply;
-    temp_str= String((char*)str->ptr(), len, cs);
+    len= str->length() * cs->casedn_multiply;
+    String temp_str= String((char*) str->ptr(), len, cs);
     len= cs->cset->casedn(cs, (char*) str->ptr(), str->length(),
                           (char*) temp_str.ptr(), len);
     temp_str.length(len);

=== modified file 'sql/string_service.h'
--- a/sql/string_service.h	2012-05-18 12:25:01 +0000
+++ b/sql/string_service.h	2012-05-18 15:35:54 +0000
@@ -18,8 +18,6 @@
 
 #include "sql_string.h"
 
-String temp_str;
-
 /* mysql_string_itrerator structure to provide service to plugins */
 struct string_iterator
 {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (ashish.y.agarwal:3890 to 3891) Ashish Agarwal20 May