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
5616bd55
Commit
5616bd55
authored
Mar 13, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unix_socket bypasses make_if_fail by not doing any network reads
parent
18830d78
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
1 deletion
+47
-1
mysql-test/r/failed_auth_unixsocket.result
mysql-test/r/failed_auth_unixsocket.result
+12
-0
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/r/failed_auth_unixsocket.result
0 → 100644
View file @
5616bd55
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/t/failed_auth_unixsocket.test
0 → 100644
View file @
5616bd55
--
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 @
5616bd55
...
...
@@ -8192,7 +8192,12 @@ bool acl_authenticate(THD *thd, uint connect_errors,
auth_plugin_name
=
&
mpvio
.
acl_user
->
plugin
;
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
;
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