mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Fix authentication plugin's tests in case username contains non-alphanumeric character, e.g dash
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
INSTALL SONAME 'auth_named_pipe';
|
INSTALL SONAME 'auth_named_pipe';
|
||||||
CREATE USER USERNAME IDENTIFIED WITH named_pipe;
|
CREATE USER 'USERNAME' IDENTIFIED WITH named_pipe;
|
||||||
SELECT USER(),CURRENT_USER();
|
SELECT USER(),CURRENT_USER();
|
||||||
USER() CURRENT_USER()
|
USER() CURRENT_USER()
|
||||||
USERNAME@localhost USERNAME@%
|
USERNAME@localhost USERNAME@%
|
||||||
DROP USER USERNAME;
|
DROP USER 'USERNAME';
|
||||||
CREATE USER nosuchuser IDENTIFIED WITH named_pipe;
|
CREATE USER nosuchuser IDENTIFIED WITH named_pipe;
|
||||||
ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
|
ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
|
||||||
DROP USER nosuchuser;
|
DROP USER nosuchuser;
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
INSTALL SONAME 'auth_named_pipe';
|
INSTALL SONAME 'auth_named_pipe';
|
||||||
|
|
||||||
--replace_result $USERNAME USERNAME
|
--replace_result $USERNAME USERNAME
|
||||||
eval CREATE USER $USERNAME IDENTIFIED WITH named_pipe;
|
eval CREATE USER '$USERNAME' IDENTIFIED WITH named_pipe;
|
||||||
# Connect using named pipe, correct username
|
# Connect using named pipe, correct username
|
||||||
connect(pipe_con,localhost,$USERNAME,,,,,PIPE);
|
connect(pipe_con,localhost,$USERNAME,,,,,PIPE);
|
||||||
--replace_result $USERNAME USERNAME
|
--replace_result $USERNAME USERNAME
|
||||||
@@ -11,7 +11,7 @@ SELECT USER(),CURRENT_USER();
|
|||||||
disconnect pipe_con;
|
disconnect pipe_con;
|
||||||
connection default;
|
connection default;
|
||||||
--replace_result $USERNAME USERNAME
|
--replace_result $USERNAME USERNAME
|
||||||
eval DROP USER $USERNAME;
|
eval DROP USER '$USERNAME';
|
||||||
|
|
||||||
# test invalid user name
|
# test invalid user name
|
||||||
CREATE USER nosuchuser IDENTIFIED WITH named_pipe;
|
CREATE USER nosuchuser IDENTIFIED WITH named_pipe;
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
INSTALL SONAME 'auth_gssapi';
|
INSTALL SONAME 'auth_gssapi';
|
||||||
CREATE USER GSSAPI_SHORTNAME IDENTIFIED WITH gssapi;
|
CREATE USER 'GSSAPI_SHORTNAME' IDENTIFIED WITH gssapi;
|
||||||
SELECT USER(),CURRENT_USER();
|
SELECT USER(),CURRENT_USER();
|
||||||
USER() CURRENT_USER()
|
USER() CURRENT_USER()
|
||||||
GSSAPI_SHORTNAME@localhost GSSAPI_SHORTNAME@%
|
GSSAPI_SHORTNAME@localhost GSSAPI_SHORTNAME@%
|
||||||
DROP USER GSSAPI_SHORTNAME;
|
DROP USER 'GSSAPI_SHORTNAME';
|
||||||
CREATE USER nosuchuser IDENTIFIED WITH gssapi;
|
CREATE USER nosuchuser IDENTIFIED WITH gssapi;
|
||||||
ERROR 28000: GSSAPI name mismatch, requested 'nosuchuser', actual name 'GSSAPI_SHORTNAME'
|
ERROR 28000: GSSAPI name mismatch, requested 'nosuchuser', actual name 'GSSAPI_SHORTNAME'
|
||||||
DROP USER nosuchuser;
|
DROP USER nosuchuser;
|
||||||
|
@@ -4,7 +4,7 @@ INSTALL SONAME 'auth_gssapi';
|
|||||||
# CREATE USER without 'AS' clause
|
# CREATE USER without 'AS' clause
|
||||||
#
|
#
|
||||||
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
|
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
|
||||||
eval CREATE USER $GSSAPI_SHORTNAME IDENTIFIED WITH gssapi;
|
eval CREATE USER '$GSSAPI_SHORTNAME' IDENTIFIED WITH gssapi;
|
||||||
connect (con1,localhost,$GSSAPI_SHORTNAME,,);
|
connect (con1,localhost,$GSSAPI_SHORTNAME,,);
|
||||||
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
|
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
|
||||||
SELECT USER(),CURRENT_USER();
|
SELECT USER(),CURRENT_USER();
|
||||||
@@ -12,7 +12,7 @@ disconnect con1;
|
|||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
|
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
|
||||||
eval DROP USER $GSSAPI_SHORTNAME;
|
eval DROP USER '$GSSAPI_SHORTNAME';
|
||||||
|
|
||||||
CREATE USER nosuchuser IDENTIFIED WITH gssapi;
|
CREATE USER nosuchuser IDENTIFIED WITH gssapi;
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
|
Reference in New Issue
Block a user