diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-01-05 22:55:07 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-01-17 18:19:29 +0100 |
commit | 7b555ff2c5cd5e7436cf9151790889aa9bcd6a70 (patch) | |
tree | fe78559227fbb781591bedec25014b79d1004f3f /sql/sql_acl.cc | |
parent | da76d25ab482c74c7b3eb66935865fee4c474f49 (diff) | |
download | mariadb-git-7b555ff2c5cd5e7436cf9151790889aa9bcd6a70.tar.gz |
MDEV-27341 Use SET PASSWORD to change PAM service
SET PASSWORD = PASSWORD('foo') would fail for pam plugin with
ERROR HY000: SET PASSWORD is ignored for users authenticating via pam plugin
but SET PASSWORD = 'foo' would not.
Now it will.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 7f20c097bdb..10805aedaf0 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2135,6 +2135,12 @@ static int set_user_auth(THD *thd, const LEX_CSTRING &user, goto end; } + if (thd->lex->sql_command == SQLCOM_SET_OPTION && !info->hash_password) + { + res= ER_SET_PASSWORD_AUTH_PLUGIN; + goto end; + } + if (info->hash_password && validate_password(thd, user, pwtext, auth->auth_string.length)) { |