summaryrefslogtreecommitdiff
path: root/mysql-test/suite/plugins
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-05-04 17:04:55 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-05-04 17:04:55 +0200
commit8cbb14ef5d180687f131bc44a4e8fc84083d033c (patch)
tree091f11e2d20f95656a7b12294782eb0488fd4fcc /mysql-test/suite/plugins
parent4345868382ca3525de5eb432302b6b9b957b47c1 (diff)
parentb85aa20065504bdda4bc03c2bd7eb7de38865c5d (diff)
downloadmariadb-git-8cbb14ef5d180687f131bc44a4e8fc84083d033c.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'mysql-test/suite/plugins')
-rw-r--r--mysql-test/suite/plugins/r/pam.result20
-rw-r--r--mysql-test/suite/plugins/t/pam.test24
2 files changed, 40 insertions, 4 deletions
diff --git a/mysql-test/suite/plugins/r/pam.result b/mysql-test/suite/plugins/r/pam.result
index 86303206b3b..46f1223d7b3 100644
--- a/mysql-test/suite/plugins/r/pam.result
+++ b/mysql-test/suite/plugins/r/pam.result
@@ -22,4 +22,24 @@ Now, the magic number!
PIN: ****
drop user test_pam;
drop user pam_test;
+create user PAM_TEST identified via pam using 'mariadb_mtr';
+#
+# athentication is unsuccessful
+#
+Challenge input first.
+Enter: not very secret challenge
+Now, the magic number!
+PIN: ****
+set global pam_winbind_workaround=1;
+#
+# athentication is successful
+#
+Challenge input first.
+Enter: not very secret challenge
+Now, the magic number!
+PIN: ****
+select user(), current_user(), database();
+user() current_user() database()
+PAM_TEST@localhost PAM_TEST@% test
+drop user PAM_TEST;
uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/t/pam.test b/mysql-test/suite/plugins/t/pam.test
index 8a95d6baed2..8441b83c5c3 100644
--- a/mysql-test/suite/plugins/t/pam.test
+++ b/mysql-test/suite/plugins/t/pam.test
@@ -17,18 +17,34 @@ EOF
--echo # athentication is successful, challenge/pin are ok
--echo # note that current_user() differs from user()
--echo #
---exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--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 --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+--exec $MYSQL_TEST -u test_pam < $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;
+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;