mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-19880 pam v1: pam password authentication doesn't work at all in MariaDB 10.4
* fix incorrect parentheses * if there was no password on the command line or in .cnf file, pkt will be "", and we need to request the user to enter the password
This commit is contained in:
@ -7,9 +7,9 @@ grant proxy on pam_test to test_pam;
|
||||
# note that current_user() differs from user()
|
||||
#
|
||||
Challenge input first.
|
||||
Enter: not very secret challenge
|
||||
Enter: *************************
|
||||
Now, the magic number!
|
||||
PIN: ****
|
||||
PIN: 9225
|
||||
select user(), current_user(), database();
|
||||
user() current_user() database()
|
||||
test_pam@localhost pam_test@% test
|
||||
@ -17,9 +17,22 @@ test_pam@localhost pam_test@% test
|
||||
# athentication is unsuccessful
|
||||
#
|
||||
Challenge input first.
|
||||
Enter: not very secret challenge
|
||||
Enter: *************************
|
||||
Now, the magic number!
|
||||
PIN: ****
|
||||
PIN: 9224
|
||||
#
|
||||
# athentication is successful
|
||||
#
|
||||
Now, the magic number!
|
||||
PIN: 9212
|
||||
select user(), current_user(), database();
|
||||
user() current_user() database()
|
||||
test_pam@localhost pam_test@% test
|
||||
#
|
||||
# athentication is unsuccessful
|
||||
#
|
||||
Now, the magic number!
|
||||
PIN: 9212
|
||||
drop user test_pam;
|
||||
drop user pam_test;
|
||||
uninstall plugin pam;
|
||||
|
@ -13,6 +13,11 @@ not very secret challenge
|
||||
select user(), current_user(), database();
|
||||
EOF
|
||||
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/pam_good2.txt
|
||||
9212
|
||||
select user(), current_user(), database();
|
||||
EOF
|
||||
|
||||
--echo #
|
||||
--echo # athentication is successful, challenge/pin are ok
|
||||
--echo # note that current_user() differs from user()
|
||||
@ -25,7 +30,20 @@ EOF
|
||||
--error 1
|
||||
--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
|
||||
|
||||
--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 #
|
||||
--echo # athentication is unsuccessful
|
||||
--echo #
|
||||
--error 1
|
||||
--exec $MYSQL_TEST -u test_pam -pbadpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/pam_good2.txt
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
|
||||
drop user test_pam;
|
||||
drop user pam_test;
|
||||
|
Reference in New Issue
Block a user