1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-29 21:42:28 +03:00
Sergei Golubchik 9ca3571cb8 MDEV-18686 Add option to PAM authentication plugin to allow case insensitive username matching
add a new option --pam-windbind-workaround for a pam plugin to
work around pam_winbind unconditional username lowercasing
2019-04-24 16:06:54 +02:00

51 lines
1.2 KiB
Plaintext

--source pam_init.inc
--write_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
not very secret challenge
9225
select user(), current_user(), database();
EOF
--write_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
not very secret challenge
9224
select user(), current_user(), database();
EOF
--echo #
--echo # athentication is successful, challenge/pin are ok
--echo # note that current_user() differs from user()
--echo #
--exec $MYSQL_TEST -u test_pam < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--echo #
--echo # athentication is unsuccessful
--echo #
--error 1
--exec $MYSQL_TEST -u test_pam < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
drop user test_pam;
drop user pam_test;
create user PAM_TEST identified via pam using 'mariadb_mtr';
--echo #
--echo # athentication is unsuccessful
--echo #
--error 1
--exec $MYSQL_TEST -u PAM_TEST < $MYSQLTEST_VARDIR/tmp/pam_good.txt
set global pam_winbind_workaround=1;
--echo #
--echo # athentication is successful
--echo #
--exec $MYSQL_TEST -u PAM_TEST < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
drop user PAM_TEST;
let $count_sessions= 1;
--source include/wait_until_count_sessions.inc
uninstall plugin pam;