1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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.
This commit is contained in:
Sergei Golubchik
2022-01-05 22:55:07 +01:00
parent da76d25ab4
commit 7b555ff2c5
4 changed files with 41 additions and 2 deletions

View File

@ -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;