mariadb/mysql-test/suite/plugins/t/pam.test

34 lines
820 B
Text
Raw Normal View History

2011-12-02 16:27:13 +01:00
--source pam_init.inc
2011-12-02 16:27:13 +01:00
--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
2012-09-25 20:23:01 +02:00
--echo # note that current_user() differs from user()
2011-12-02 16:27:13 +01:00
--echo #
--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--echo #
--echo # athentication is unsuccessful
--echo #
--error 1
--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
drop user test_pam;
drop user pam_test;
2011-12-02 16:27:13 +01:00
uninstall plugin pam;