mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-33393 audit plugin do not report user did the action..
The '<replication_slave>' user is assigned to the slave replication thread so this name appears in the auditing logs.
This commit is contained in:
@ -2776,9 +2776,10 @@ static my_bool list_callback(THD *tmp, list_callback_arg *arg)
|
||||
|
||||
thd_info->thread_id=tmp->thread_id;
|
||||
thd_info->os_thread_id=tmp->os_thread_id;
|
||||
thd_info->user= arg->thd->strdup(tmp_sctx->user ? tmp_sctx->user :
|
||||
(tmp->system_thread ?
|
||||
"system user" : "unauthenticated user"));
|
||||
thd_info->user= arg->thd->strdup(tmp_sctx->user && tmp_sctx->user != slave_user ?
|
||||
tmp_sctx->user :
|
||||
(tmp->system_thread ?
|
||||
"system user" : "unauthenticated user"));
|
||||
if (tmp->peer_port && (tmp_sctx->host || tmp_sctx->ip) &&
|
||||
arg->thd->security_ctx->host_or_ip[0])
|
||||
{
|
||||
@ -3225,7 +3226,7 @@ static my_bool processlist_callback(THD *tmp, processlist_callback_arg *arg)
|
||||
/* ID */
|
||||
arg->table->field[0]->store((longlong) tmp->thread_id, TRUE);
|
||||
/* USER */
|
||||
val= tmp_sctx->user ? tmp_sctx->user :
|
||||
val= tmp_sctx->user && tmp_sctx->user != slave_user ? tmp_sctx->user :
|
||||
(tmp->system_thread ? "system user" : "unauthenticated user");
|
||||
arg->table->field[1]->store(val, strlen(val), cs);
|
||||
/* HOST */
|
||||
|
Reference in New Issue
Block a user