← Back to team overview

maria-developers team mailing list archive

Re: MDEV-4472 (audit plugin)

 

Hi, Alexey!

On Jul 01, Alexey Botchkov wrote:
> Hi, Serg.
> 
> Here is the last version of the plugin for your review:
> http://myoffice.izhnet.ru/~alex/server_audit/server_audit.c 
> <http://myoffice.izhnet.ru/%7Ealex/server_audit/server_audit.c>
> 
> I think I addressed there everything we discussed.

Could you send a complete patch instead, please?
Looks ok, a couple of comments:

  #ifndef MARIADB_ONLY
  #undef MYSQL_SERVICE_LOGGER_INCLUDED
  #undef MYSQL_DYNAMIC_PLUGIN

^^^ why undefs?
I wouldn't need to ask this question, if I'd have a complete patch,
that includes file_logger.c

  ...
    if (gethostname(servhost, sizeof(servhost)))
      strcpy(servhost, "NA");
^^^
It's usually written as "N/A" and means "not applicable". But the host
name here is most certainly applicable. Better use "???" or "unknown" or
even "localhost".

And two more comments:
1. I presume the complete patch includes test cases for the new plugin.
2. Could you please move HASH into a service? In a separate changeset,
   of course. Moving an existing function into a service does not change
   the source code of plugins, so you can do it after you've pushed
   this audit plugin, if you'd like.

Regards,
Sergei


Follow ups

References