diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index f3f3edae3b4..25d5613669d 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2184,7 +2184,6 @@ String *Item_func_password::val_str_ascii(String *str) String *res= args[0]->val_str(str); switch (alg){ case NEW: - check_password_policy(res); if (args[0]->null_value || res->length() == 0) return make_empty_result(); my_make_scrambled_password(tmp_value, res->ptr(), res->length()); @@ -2215,13 +2214,8 @@ char *Item_func_password::alloc(THD *thd, const char *password, switch (al) { case NEW: - { - String *password_str= new (thd->mem_root)String(password, thd->variables. - character_set_client); - check_password_policy(password_str); - my_make_scrambled_password(buff, password, pass_len); - break; - } + my_make_scrambled_password(buff, password, pass_len); + break; case OLD: my_make_scrambled_password_323(buff, password, pass_len); break; diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 064aaa869b4..e1e075df6d6 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2406,7 +2406,7 @@ static void init_check_host(void) 'acl_user' array, which are invalidated by drop operation, and use ACL_USER::host::hostname as a key, which is changed by rename. */ -void rebuild_check_host(void) +static void rebuild_check_host(void) { delete_dynamic(&acl_wild_hosts); my_hash_free(&acl_check_hosts); @@ -2594,7 +2594,7 @@ bool acl_check_host(const char *host, const char *ip) @retval 1 Error */ -int check_alter_user(THD *thd, const char *host, const char *user) +static int check_alter_user(THD *thd, const char *host, const char *user) { int error = 1; if (!initialized) @@ -5596,7 +5596,7 @@ static bool merge_one_role_privileges(ACL_ROLE *grantee) End of the role privilege propagation and graph traversal code ******************************************************************/ -bool copy_and_check_auth(LEX_USER *to, LEX_USER *from, LEX *lex) +static bool copy_and_check_auth(LEX_USER *to, LEX_USER *from, LEX *lex) { if (to != from) { @@ -6646,7 +6646,8 @@ end_index_init: } -my_bool role_propagate_grants_action(void *ptr, void *unused __attribute__((unused))) +static my_bool role_propagate_grants_action(void *ptr, + void *unused __attribute__((unused))) { ACL_ROLE *role= (ACL_ROLE *)ptr; if (role->counter) @@ -8426,26 +8427,6 @@ static int open_grant_tables(THD *thd, TABLE_LIST *tables, DBUG_RETURN(0); } -ACL_USER *check_acl_user(LEX_USER *user_name, uint *acl_acl_userdx) -{ - ACL_USER *acl_user= 0; - uint counter; - - mysql_mutex_assert_owner(&acl_cache->lock); - - for (counter= 0 ; counter < acl_users.elements ; counter++) - { - acl_user= dynamic_element(&acl_users, counter, ACL_USER*); - if(acl_user->eq(user_name->user.str, user_name->host.str)) - break; - } - if (counter == acl_users.elements) - return 0; - - *acl_acl_userdx= counter; - return acl_user; -} - /* Modify a privilege table. @@ -12629,9 +12610,3 @@ maria_declare_plugin(mysql_password) } maria_declare_plugin_end; - -/* called when new user is created or exsisting password is changed */ -int check_password_policy(String *password) -{ - return (0); -} diff --git a/sql/sql_acl.h b/sql/sql_acl.h index 28eb7a7f933..1bdf2820086 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -266,7 +266,6 @@ int fill_schema_schema_privileges(THD *thd, TABLE_LIST *tables, COND *cond); int fill_schema_table_privileges(THD *thd, TABLE_LIST *tables, COND *cond); int fill_schema_column_privileges(THD *thd, TABLE_LIST *tables, COND *cond); int wild_case_compare(CHARSET_INFO *cs, const char *str,const char *wildstr); -int check_password_policy(String *password); /** Result of an access check for an internal schema or table. diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 157e320d361..3ed7807583a 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -29,7 +29,7 @@ #include "sql_table.h" // build_table_filename, // check_n_cut_mysql50_prefix #include "sql_db.h" // get_default_db_collation -#include "sql_acl.h" // *_ACL, is_acl_user +#include "sql_acl.h" // *_ACL #include "sql_handler.h" // mysql_ha_rm_tables #include "sp_cache.h" // sp_invalidate_cache #include