1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-19879 server can send empty error message to client with pam_use_cleartext_plugin

fixed in MDEV-19878, here just adding tests
This commit is contained in:
Sergei Golubchik
2019-06-30 21:29:38 +02:00
parent 3914a792d8
commit 4f87ad1975
3 changed files with 42 additions and 15 deletions

View File

@ -8,6 +8,14 @@ pam_use_cleartext_plugin ON
#
# same test as in pam.test now fails
#
#
# success
#
user() current_user() database()
test_pam@localhost pam_test@% NULL
#
# failure
#
drop user test_pam;
drop user pam_test;
uninstall plugin pam;

View File

@ -14,9 +14,22 @@ EOF
--echo #
--error 1
--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--error 1
--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir -p'something' < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
--echo #
--echo # success
--echo #
--exec $MYSQL -u test_pam --plugin-dir=$plugindir -p'cleartext good' -e 'select user(), current_user(), database()'
--echo #
--echo # failure
--echo #
--error 1
--exec $MYSQL -u test_pam --plugin-dir=$plugindir -p'cleartext bad' -e 'select user(), current_user(), database()'
drop user test_pam;
drop user pam_test;
let $count_sessions= 1;