From 506572b69e4e5f226248eaab923c2b77d794ded7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Nov 2003 13:11:44 +0300 Subject: Second part of WL #519: Client option secure-auth deployed on all possible layers: - mysql client command-line and config file option - mysql_options option MYSQL_SECURE_AUTH - mysql_real_connect will automatically take into account that option if mysql->options.my_cnf_file/my_cnf_group is set client/client_priv.h: added OPT_SECURE_AUTH to enum of all my_read_default_options options. client/mysql.cc: added support for mysql command-line option --secure-auth include/errmsg.h: added return code for option --secure-auth include/mysql.h: added MYSQL_SECURE_AUTH to enum of all mysql_options options. added secure_auth flag to MYSQL handle libmysql/errmsg.c: Error messages for option --secure-auth sql-common/client.c: added check for secure-auth in mysql_real_connect: if password is provided, and secure-auth is on, then client will refuse connecting to pre-4.1.1 server --- libmysql/errmsg.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libmysql/errmsg.c') diff --git a/libmysql/errmsg.c b/libmysql/errmsg.c index 148625129b5..4dfcfe6a1d3 100644 --- a/libmysql/errmsg.c +++ b/libmysql/errmsg.c @@ -72,7 +72,8 @@ const char *client_errors[]= "Can't open shared memory. Can't send the request event to server (%lu)", "Wrong or unknown protocol", "Invalid connection handle", - "mysql_server_init wasn't called" + "mysql_server_init wasn't called", + "Connection using old (pre 4.1.1) authentication protocol refused (client option 'secure_auth' enabled)" }; /* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */ @@ -128,7 +129,8 @@ const char *client_errors[]= "Can't open shared memory. Can't send the request event to server (%lu)", "Wrong or unknown protocol", "Invalid connection handle", - "mysql_server_init wasn't called" + "mysql_server_init wasn't called", + "Connection using old (pre 4.1.1) authentication protocol refused (client option 'secure_auth' enabled)" }; #else /* ENGLISH */ @@ -182,7 +184,8 @@ const char *client_errors[]= "Can't open shared memory. Can't send the request event to server (%lu)", "Wrong or unknown protocol", "Invalid connection handle", - "mysql_server_init wasn't called" + "mysql_server_init wasn't called", + "Connection using old (pre 4.1.1) authentication protocol refused (client option 'secure_auth' enabled)" }; #endif -- cgit v1.2.1