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 /mysql-test/suite/plugins | |
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 'mysql-test/suite/plugins')
-rw-r--r-- | mysql-test/suite/plugins/r/pam.result | 17 | ||||
-rw-r--r-- | mysql-test/suite/plugins/t/pam.test | 17 |
2 files changed, 33 insertions, 1 deletions
diff --git a/mysql-test/suite/plugins/r/pam.result b/mysql-test/suite/plugins/r/pam.result index fca6e2b08c3..b8588916169 100644 --- a/mysql-test/suite/plugins/r/pam.result +++ b/mysql-test/suite/plugins/r/pam.result @@ -91,4 +91,21 @@ select user(), current_user(), database(); user() current_user() database() PAM_TEST@localhost PAM_TEST@% test drop user PAM_TEST; +# +# MDEV-27341 Use SET PASSWORD to change PAM service +# +create user pam_test identified via pam using 'mariadb_mtr'; +Challenge input first. +Enter: ************************* +Now, the magic number! +PIN: 9225 +select user(), current_user(), database(); +user() current_user() database() +pam_test@localhost pam_test@% test +set password='foo'; +ERROR HY000: SET PASSWORD is ignored for users authenticating via pam plugin +show create user; +CREATE USER for pam_test@% +CREATE USER `pam_test`@`%` IDENTIFIED VIA pam USING 'mariadb_mtr' +drop user pam_test; uninstall plugin pam; diff --git a/mysql-test/suite/plugins/t/pam.test b/mysql-test/suite/plugins/t/pam.test index f53d6673918..9077de4c98b 100644 --- a/mysql-test/suite/plugins/t/pam.test +++ b/mysql-test/suite/plugins/t/pam.test @@ -45,7 +45,6 @@ EOF --echo # --echo # athentication is successful --echo # ---error 0 --exec $MYSQL_TEST -u test_pam -pgoodpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt --echo # @@ -106,6 +105,22 @@ set global pam_winbind_workaround=1; --remove_file $MYSQLTEST_VARDIR/tmp/pam_ugly.txt drop user PAM_TEST; +--echo # +--echo # MDEV-27341 Use SET PASSWORD to change PAM service +--echo # +create user pam_test identified via pam using 'mariadb_mtr'; +--write_file $MYSQLTEST_VARDIR/tmp/setpwd.txt +not very secret challenge +9225 +select user(), current_user(), database(); +error ER_SET_PASSWORD_AUTH_PLUGIN; +set password='foo'; +show create user; +EOF +--exec $MYSQL_TEST -u pam_test < $MYSQLTEST_VARDIR/tmp/setpwd.txt +--remove_file $MYSQLTEST_VARDIR/tmp/setpwd.txt +drop user pam_test; + let $count_sessions= 1; --source include/wait_until_count_sessions.inc uninstall plugin pam; |