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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
178d32f0
Commit
178d32f0
authored
Dec 01, 2020
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-24318 server_audit doesn't respect filters for PROXY_CONNECT
events. The log line should be added behind the filters.
parent
e6b3e38d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
mysql-test/suite/plugins/r/server_audit.result
mysql-test/suite/plugins/r/server_audit.result
+1
-1
plugin/server_audit/server_audit.c
plugin/server_audit/server_audit.c
+4
-4
No files found.
mysql-test/suite/plugins/r/server_audit.result
View file @
178d32f0
...
@@ -440,8 +440,8 @@ TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,,,0
...
@@ -440,8 +440,8 @@ TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,,,0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT PROXY ON plug_dest TO plug',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT PROXY ON plug_dest TO plug',0
TIME,HOSTNAME,plug,localhost,ID,0,PROXY_CONNECT,test,`plug_dest`@`%`,0
TIME,HOSTNAME,plug,localhost,ID,0,CONNECT,test,,0
TIME,HOSTNAME,plug,localhost,ID,0,CONNECT,test,,0
TIME,HOSTNAME,plug,localhost,ID,0,PROXY_CONNECT,test,`plug_dest`@`%`,0
TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,test,,0
TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,test,,0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
...
...
plugin/server_audit/server_audit.c
View file @
178d32f0
...
@@ -2067,13 +2067,9 @@ static void update_connection_info(struct connection_info *cn,
...
@@ -2067,13 +2067,9 @@ static void update_connection_info(struct connection_info *cn,
{
{
case
MYSQL_AUDIT_CONNECTION_CONNECT
:
case
MYSQL_AUDIT_CONNECTION_CONNECT
:
setup_connection_connect
(
cn
,
event
);
setup_connection_connect
(
cn
,
event
);
if
(
event
->
status
==
0
&&
event
->
proxy_user
&&
event
->
proxy_user
[
0
])
log_proxy
(
cn
,
event
);
break
;
break
;
case
MYSQL_AUDIT_CONNECTION_CHANGE_USER
:
case
MYSQL_AUDIT_CONNECTION_CHANGE_USER
:
*
after_action
=
AA_CHANGE_USER
;
*
after_action
=
AA_CHANGE_USER
;
if
(
event
->
proxy_user
&&
event
->
proxy_user
[
0
])
log_proxy
(
cn
,
event
);
break
;
break
;
default:
;
default:
;
}
}
...
@@ -2191,6 +2187,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
...
@@ -2191,6 +2187,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
{
{
case
MYSQL_AUDIT_CONNECTION_CONNECT
:
case
MYSQL_AUDIT_CONNECTION_CONNECT
:
log_connection
(
cn
,
event
,
event
->
status
?
"FAILED_CONNECT"
:
"CONNECT"
);
log_connection
(
cn
,
event
,
event
->
status
?
"FAILED_CONNECT"
:
"CONNECT"
);
if
(
event
->
status
==
0
&&
event
->
proxy_user
&&
event
->
proxy_user
[
0
])
log_proxy
(
cn
,
event
);
break
;
break
;
case
MYSQL_AUDIT_CONNECTION_DISCONNECT
:
case
MYSQL_AUDIT_CONNECTION_DISCONNECT
:
if
(
use_event_data_for_disconnect
)
if
(
use_event_data_for_disconnect
)
...
@@ -2200,6 +2198,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
...
@@ -2200,6 +2198,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
break
;
break
;
case
MYSQL_AUDIT_CONNECTION_CHANGE_USER
:
case
MYSQL_AUDIT_CONNECTION_CHANGE_USER
:
log_connection
(
cn
,
event
,
"CHANGEUSER"
);
log_connection
(
cn
,
event
,
"CHANGEUSER"
);
if
(
event
->
proxy_user
&&
event
->
proxy_user
[
0
])
log_proxy
(
cn
,
event
);
break
;
break
;
default:
;
default:
;
}
}
...
...
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