List:Commits« Previous MessageNext Message »
From:Ashish Agarwal Date:May 18 2012 12:25pm
Subject:bzr push into mysql-trunk branch (ashish.y.agarwal:3889 to 3890)
View as plain text  
 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
 3889 Ashish Agarwal	2012-05-18
      WL2739: Auditing Password Security
              Implementing review comment

    added:
      sql/string_service.cc
      sql/string_service.h
    modified:
      include/mysql/plugin_audit.h.pp
      include/mysql/plugin_auth.h.pp
      include/mysql/plugin_ftparser.h.pp
      include/mysql/plugin_validate_password.h
      include/mysql/service_mysql_string.h
      mysql-test/include/have_validate_password_plugin.inc
      mysql-test/include/plugin.defs
      mysql-test/r/validate_password_plugin.result
      mysql-test/t/validate_password_plugin-master.opt
      mysql-test/t/validate_password_plugin.test
      plugin/password_validation/validate_password.cc
      sql/CMakeLists.txt
      sql/item_strfunc.cc
      sql/share/errmsg-utf8.txt
      sql/sql_acl.cc
      sql/sql_acl.h
      sql/sql_plugin_services.h
      sql/sql_yacc.yy
=== modified file 'mysql-test/r/validate_password_plugin.result'
--- a/mysql-test/r/validate_password_plugin.result	2012-05-18 06:31:26 +0000
+++ b/mysql-test/r/validate_password_plugin.result	2012-05-18 12:25:01 +0000
@@ -82,7 +82,7 @@ VALIDATE_PASSWORD_STRENGTH('PA00wrd!#')
 SET NAMES 'ujis';
 SELECT VALIDATE_PASSWORD_STRENGTH('PA12wrd!#');
 VALIDATE_PASSWORD_STRENGTH('PA12wrd!#')
-75
+100
 SET @@global.validate_password_policy_number=MEDIUM;
 SET @@global.validate_password_policy_number=LOW;
 ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2012-05-18 06:31:26 +0000
+++ b/sql/sql_acl.cc	2012-05-18 12:25:01 +0000
@@ -176,11 +176,11 @@ const TABLE_FIELD_DEF
 static LEX_STRING native_password_plugin_name= {
   C_STRING_WITH_LEN("mysql_native_password")
 };
-
+  
 static LEX_STRING old_password_plugin_name= {
   C_STRING_WITH_LEN("mysql_old_password")
 };
-
+  
 static LEX_STRING validate_password_plugin_name= {
   C_STRING_WITH_LEN("validate_password")
 };

=== modified file 'sql/string_service.cc'
--- a/sql/string_service.cc	2012-05-18 06:31:26 +0000
+++ b/sql/string_service.cc	2012-05-18 12:25:01 +0000
@@ -132,21 +132,19 @@ extern "C"
 mysql_string_handle mysql_string_to_lowercase(mysql_string_handle string_handle)
 {
   String *str= (String *) string_handle;
-  String temp_str;
+  uint len= str->length();
   const CHARSET_INFO *cs= str->charset();
 
   if (cs->casedn_multiply == 1)
   {
-    uint len;
     len= cs->cset->casedn(cs, (char*) str->ptr(), str->length(),
                           (char*) str->ptr(), str->length());
     str->length(len);
   }
   else
   {
-    uint len= str->length() * cs->casedn_multiply;
-    temp_str.alloc(len);
-    temp_str.set_charset(cs);
+    len= len * cs->casedn_multiply;
+    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 06:31:26 +0000
+++ b/sql/string_service.h	2012-05-18 12:25:01 +0000
@@ -16,7 +16,9 @@
 #ifndef STRING_SERVICE_INCLUDED
 #define STRING_SERVICE_INCLUDED
 
-#include <sql_string.h>
+#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:3889 to 3890) Ashish Agarwal20 May