mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
mysql: Implement and test COM_CHANGE_USER
This reworks the parser such that COM_CHANGE_USER switches the connection back into the CONNECTION_PHASE so that we can remove the EXPECT_AUTH_SWITCH special case in the COMMAND_PHASE. Adds two pcaps produced with Python that actually do COM_CHANGE_USER as it seems not possible from the MySQL CLI.
This commit is contained in:
parent
a4c79e7304
commit
02f4665e9b
12 changed files with 275 additions and 18 deletions
|
@ -84,6 +84,11 @@ event mysql_command_request(c: connection, command: count, arg: string) &priorit
|
|||
Conn::register_removal_hook(c, finalize_mysql);
|
||||
}
|
||||
|
||||
event mysql_change_user(c: connection, username: string) &priority=5
|
||||
{
|
||||
c$mysql$arg = username;
|
||||
}
|
||||
|
||||
event mysql_command_request(c: connection, command: count, arg: string) &priority=-5
|
||||
{
|
||||
if ( c?$mysql && c$mysql?$cmd && c$mysql$cmd == "quit" )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue