mirror of
https://github.com/MariaDB/server.git
synced 2026-04-20 07:15:33 +02:00
MDEV-19851 server_audit plugin should not allow server_audit_output_type=SYSLOG on Windows.
'syslog' output type disabled on Windows.
This commit is contained in:
parent
bf37b9fce9
commit
a099284b71
1 changed files with 16 additions and 1 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include <fcntl.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#define DO_SYSLOG
|
||||
#include <syslog.h>
|
||||
#else
|
||||
#define syslog(PRIORITY, FORMAT, INFO, MESSAGE_LEN, MESSAGE) do {}while(0)
|
||||
|
|
@ -384,17 +385,31 @@ static MYSQL_SYSVAR_SET(events, events, PLUGIN_VAR_RQCMDARG,
|
|||
"Specifies the set of events to monitor. Can be CONNECT, QUERY, TABLE,"
|
||||
" QUERY_DDL, QUERY_DML, QUERY_DML_NO_SELECT, QUERY_DCL.",
|
||||
NULL, NULL, 0, &events_typelib);
|
||||
#ifdef DO_SYSLOG
|
||||
#define OUTPUT_SYSLOG 0
|
||||
#define OUTPUT_FILE 1
|
||||
#else
|
||||
#define OUTPUT_SYSLOG 0xFFFF
|
||||
#define OUTPUT_FILE 0
|
||||
#endif /*DO_SYSLOG*/
|
||||
|
||||
#define OUTPUT_NO 0xFFFF
|
||||
static const char *output_type_names[]= { "syslog", "file", 0 };
|
||||
static const char *output_type_names[]= {
|
||||
#ifdef DO_SYSLOG
|
||||
"syslog",
|
||||
#endif
|
||||
"file", 0 };
|
||||
static TYPELIB output_typelib=
|
||||
{
|
||||
array_elements(output_type_names) - 1, "output_typelib",
|
||||
output_type_names, NULL
|
||||
};
|
||||
static MYSQL_SYSVAR_ENUM(output_type, output_type, PLUGIN_VAR_RQCMDARG,
|
||||
#ifdef DO_SYSLOG
|
||||
"Desired output type. Possible values - 'syslog', 'file'"
|
||||
#else
|
||||
"Desired output type. Possible values - 'file'"
|
||||
#endif
|
||||
" or 'null' as no output.", 0, update_output_type, OUTPUT_FILE,
|
||||
&output_typelib);
|
||||
static MYSQL_SYSVAR_STR(file_path, file_path, PLUGIN_VAR_RQCMDARG,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue