diff options
author | unknown <konstantin@oak.local> | 2003-11-28 13:11:44 +0300 |
---|---|---|
committer | unknown <konstantin@oak.local> | 2003-11-28 13:11:44 +0300 |
commit | 506572b69e4e5f226248eaab923c2b77d794ded7 (patch) | |
tree | f8c0751dc8b9a854f23875f0188a056c63632876 /include | |
parent | 94387d4be3a066bcc5a8b9a495dd5b1ef4e75513 (diff) | |
download | mariadb-git-506572b69e4e5f226248eaab923c2b77d794ded7.tar.gz |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/errmsg.h | 1 | ||||
-rw-r--r-- | include/mysql.h | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/errmsg.h b/include/errmsg.h index a354c125e36..24326b1efef 100644 --- a/include/errmsg.h +++ b/include/errmsg.h @@ -87,3 +87,4 @@ extern const char *client_errors[]; /* Error messages */ #define CR_CONN_UNKNOW_PROTOCOL 2046 #define CR_INVALID_CONN_HANDLE 2047 #define CR_MYSQL_SERVER_INIT_MISSED 2048 +#define CR_SECURE_AUTH 2049 diff --git a/include/mysql.h b/include/mysql.h index 23d89fd531f..fd0330b35da 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -145,7 +145,7 @@ enum mysql_option MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT, MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT, MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION, - MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP + MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH }; struct st_mysql_options { @@ -184,6 +184,8 @@ struct st_mysql_options { #endif enum mysql_option methods_to_use; char *client_ip; + /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */ + my_bool secure_auth; }; enum mysql_status |