Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a0ea960c
Commit
a0ea960c
authored
Mar 13, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
5.2 merge
parents
fad4b333
5616bd55
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
6 deletions
+58
-6
mysql-test/include/have_unix_socket.inc
mysql-test/include/have_unix_socket.inc
+10
-0
mysql-test/r/failed_auth_unixsocket.result
mysql-test/r/failed_auth_unixsocket.result
+12
-0
mysql-test/suite/plugins/t/unix_socket.test
mysql-test/suite/plugins/t/unix_socket.test
+1
-5
mysql-test/t/failed_auth_unixsocket.test
mysql-test/t/failed_auth_unixsocket.test
+29
-0
sql/sql_acl.cc
sql/sql_acl.cc
+6
-1
No files found.
mysql-test/include/have_unix_socket.inc
0 → 100644
View file @
a0ea960c
--
source
include
/
not_embedded
.
inc
if
(
!
$AUTH_SOCKET_SO
)
{
skip
No
unix_socket
plugin
;
}
if
(
!
$USER
)
{
skip
USER
variable
is
undefined
;
}
mysql-test/r/failed_auth_unixsocket.result
0 → 100644
View file @
a0ea960c
update mysql.user set plugin='unix_socket';
flush privileges;
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
ERROR HY000: Plugin 'unix_socket' is not loaded
ERROR HY000: Plugin 'unix_socket' is not loaded
install plugin unix_socket soname 'auth_socket.so';
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
ERROR 28000: Access denied for user 'USER'@'localhost' (using password: NO)
ERROR 28000: Access denied for user 'USER'@'localhost' (using password: NO)
update mysql.user set plugin='';
flush privileges;
uninstall plugin unix_socket;
mysql-test/suite/plugins/t/unix_socket.test
View file @
a0ea960c
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_unix_socket
.
inc
if
(
!
$AUTH_SOCKET_SO
)
{
skip
No
auth_socket
plugin
;
}
let
$plugindir
=
`SELECT @@global.plugin_dir`
;
let
$plugindir
=
`SELECT @@global.plugin_dir`
;
...
...
mysql-test/t/failed_auth_unixsocket.test
0 → 100644
View file @
a0ea960c
--
source
include
/
have_unix_socket
.
inc
#
# MDEV-3909 remote user enumeration
# unix_socket tests
#
update
mysql
.
user
set
plugin
=
'unix_socket'
;
flush
privileges
;
--
replace_result
$MASTER_MYSOCK
MASTER_SOCKET
$MASTER_MYPORT
MASTER_PORT
$USER
USER
--
error
ER_PLUGIN_IS_NOT_LOADED
connect
(
fail
,
localhost
,
$USER
);
--
error
ER_PLUGIN_IS_NOT_LOADED
change_user
$USER
;
eval
install
plugin
unix_socket
soname
'$AUTH_SOCKET_SO'
;
--
replace_result
$MASTER_MYSOCK
MASTER_SOCKET
$MASTER_MYPORT
MASTER_PORT
$USER
USER
--
error
ER_ACCESS_DENIED_ERROR
connect
(
fail
,
localhost
,
$USER
);
--
error
ER_ACCESS_DENIED_ERROR
change_user
$USER
;
update
mysql
.
user
set
plugin
=
''
;
flush
privileges
;
uninstall
plugin
unix_socket
;
sql/sql_acl.cc
View file @
a0ea960c
...
@@ -8193,7 +8193,12 @@ bool acl_authenticate(THD *thd, uint connect_errors,
...
@@ -8193,7 +8193,12 @@ bool acl_authenticate(THD *thd, uint connect_errors,
auth_plugin_name
=
&
mpvio
.
acl_user
->
plugin
;
auth_plugin_name
=
&
mpvio
.
acl_user
->
plugin
;
res
=
do_auth_once
(
thd
,
auth_plugin_name
,
&
mpvio
);
res
=
do_auth_once
(
thd
,
auth_plugin_name
,
&
mpvio
);
}
}
if
(
mpvio
.
make_it_fail
)
{
mpvio
.
status
=
MPVIO_EXT
::
FAILURE
;
res
=
CR_ERROR
;
}
Security_context
*
sctx
=
thd
->
security_ctx
;
Security_context
*
sctx
=
thd
->
security_ctx
;
ACL_USER
*
acl_user
=
mpvio
.
acl_user
;
ACL_USER
*
acl_user
=
mpvio
.
acl_user
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment