summaryrefslogtreecommitdiff
path: root/mysql-test/main/plugin_auth_qa_1.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-06-10 09:24:43 +0200
committerSergei Golubchik <serg@mariadb.org>2019-06-17 12:26:25 +0200
commitfd00c449e33a5e4dda23832a16512d3af5939818 (patch)
treea9aeedc4e6ed1b111bfdb6e638dd14614faea62f /mysql-test/main/plugin_auth_qa_1.test
parentd13080133f6de9d89975b4c1f09615d47a10748d (diff)
downloadmariadb-git-fd00c449e33a5e4dda23832a16512d3af5939818.tar.gz
bugfix: PROXY privilege matched usernames incorrectly
username can be empty, meaning anybody, or must match literally. only db and host names are matched with wildcards.
Diffstat (limited to 'mysql-test/main/plugin_auth_qa_1.test')
-rw-r--r--mysql-test/main/plugin_auth_qa_1.test4
1 files changed, 4 insertions, 0 deletions
diff --git a/mysql-test/main/plugin_auth_qa_1.test b/mysql-test/main/plugin_auth_qa_1.test
index fb577fc178f..17fbf2ca25e 100644
--- a/mysql-test/main/plugin_auth_qa_1.test
+++ b/mysql-test/main/plugin_auth_qa_1.test
@@ -13,6 +13,10 @@ SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
# CREATE...WITH/CREATE...BY/GRANT
CREATE USER plug_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
+GRANT PROXY ON `plug%dest` TO plug_user;
+--error 1
+--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
+REVOKE PROXY ON `plug%dest` FROM plug_user;
GRANT PROXY ON plug_dest TO plug_user;
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1