diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-01-23 16:24:32 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-01-25 17:04:15 +0100 |
commit | c37107380abf8f4c04c270ee7afdf8e16042c943 (patch) | |
tree | 68d7c5cf8a951cb77a854d9091d1c140ffe5fa33 /sql/structs.h | |
parent | 1fea7e785f2de734fb3e278c9c0df2776f565c06 (diff) | |
download | mariadb-git-c37107380abf8f4c04c270ee7afdf8e16042c943.tar.gz |
cleanup: LEX_USER::pwtext and LEX_USER::pwhash
Was:
* LEX_USER::password was storing sometimes
plaintext password and sometimes password hash
* LEX_USER::auth was storing sometimes password hash and
sometimes plugin authentication string
Now:
* LEX_USER::pwtext stores the password in plain-text
* LEX_USER::pwhash stores the password hash
* LEX_USER::auth stores the plugin authentication string
Diffstat (limited to 'sql/structs.h')
-rw-r--r-- | sql/structs.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/structs.h b/sql/structs.h index 986b0d64bb0..c1c832d07ec 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -202,7 +202,8 @@ extern const char *show_comp_option_name[]; typedef int *(*update_var)(THD *, struct st_mysql_show_var *); typedef struct st_lex_user { - LEX_STRING user, host, password, plugin, auth; + LEX_STRING user, host, plugin, auth; + LEX_STRING pwtext, pwhash; bool is_role() { return user.str[0] && !host.str[0]; } void set_lex_string(LEX_STRING *l, char *buf) { @@ -213,8 +214,8 @@ typedef struct st_lex_user { } void reset_auth() { - password.length= plugin.length= auth.length= 0; - password.str= 0; + pwtext.length= pwhash.length= plugin.length= auth.length= 0; + pwtext.str= pwhash.str= 0; plugin.str= auth.str= const_cast<char*>(""); } } LEX_USER; |