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:
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user