From 97057115962d9dfbe989c799cff089aec5cbcc60 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Mon, 9 Aug 2010 11:32:50 +0300 Subject: WL#1054: Pluggable authentication support Merged the implementation to a new base tree. --- sql/sql_connect.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/sql_connect.h') diff --git a/sql/sql_connect.h b/sql/sql_connect.h index 2334b7303be..06cb4287f3a 100644 --- a/sql/sql_connect.h +++ b/sql/sql_connect.h @@ -40,4 +40,8 @@ int check_user(THD *thd, enum enum_server_command command, const char *passwd, uint passwd_len, const char *db, bool check_count); +int get_or_create_user_conn(THD *thd, const char *user, + const char *host, const USER_RESOURCES *mqh); +int check_for_max_user_connections(THD *thd, USER_CONN *uc); + #endif /* SQL_CONNECT_INCLUDED */ -- cgit v1.2.1 From 6d45d27cbc9c343736a97cafa504eb1998d8bd70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20Ronstr=C3=B6m?= Date: Thu, 10 Feb 2011 18:41:02 +0100 Subject: Simplify interface to connect methods in server --- sql/sql_connect.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/sql_connect.h') diff --git a/sql/sql_connect.h b/sql/sql_connect.h index 666db4c6462..c0cb100c779 100644 --- a/sql/sql_connect.h +++ b/sql/sql_connect.h @@ -35,6 +35,8 @@ void time_out_user_resource_limits(THD *thd, USER_CONN *uc); void decrease_user_connections(USER_CONN *uc); void thd_init_client_charset(THD *thd, uint cs_number); bool setup_connection_thread_globals(THD *thd); +bool thd_prepare_connection(THD *thd); +bool thd_is_connection_alive(THD *thd); int check_user(THD *thd, enum enum_server_command command, const char *passwd, uint passwd_len, const char *db, -- cgit v1.2.1 From f4beb9294046ac368cfb66fc3270298a85dbdf4a Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 18 Feb 2011 12:46:55 +0300 Subject: Bug#11765108 (Bug#58036) client utf32, utf16, ucs2 should be disallowed, they crash server Problem: ucs2 was correctly disallowed in "SET NAMES" only, while mysql_real_connect() and mysql_change_user() still allowed to use ucs2, which made server crash. Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user(). @ sql/set_var.cc Using new function. @ sql/sql_acl.cc - Return error if character set initialization failed - Getting rid of pointer aliasing: Initialize user_name to NULL, to avoid double free(). @ sql/sql_connect.cc - in case of unsupported client character set send error and return true - in case of success return false @ sql/sql_connect.h - changing return type for thd_init_client_charset() to bool, to return errors to the caller @ sql/sql_parse.h - introducing a new function, to reuse in all places where we need to check client character set. @ tests/mysql_client_test.c Adding test --- sql/sql_connect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_connect.h') diff --git a/sql/sql_connect.h b/sql/sql_connect.h index 666db4c6462..ff5a20dfbc2 100644 --- a/sql/sql_connect.h +++ b/sql/sql_connect.h @@ -33,7 +33,7 @@ void reset_mqh(LEX_USER *lu, bool get_them); bool check_mqh(THD *thd, uint check_command); void time_out_user_resource_limits(THD *thd, USER_CONN *uc); void decrease_user_connections(USER_CONN *uc); -void thd_init_client_charset(THD *thd, uint cs_number); +bool thd_init_client_charset(THD *thd, uint cs_number); bool setup_connection_thread_globals(THD *thd); int check_user(THD *thd, enum enum_server_command command, -- cgit v1.2.1