You've already forked mysql-audit
mirror of
https://github.com/trellix-enterprise/mysql-audit.git
synced 2025-12-17 18:24:02 +08:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd928db022 | ||
|
|
622366a459 | ||
|
|
3ec0c137c9 | ||
|
|
a875a835a4 | ||
|
|
2b130c7bd7 | ||
|
|
266447b8b7 | ||
|
|
416e6fa0aa |
@@ -42,7 +42,7 @@ Source code is available at: https://github.com/mcafee/mysql-audit
|
||||
|
||||
License
|
||||
-------------------------------
|
||||
Copyright (C) 2011-2018 McAfee, LLC.
|
||||
Copyright (C) 2011-2021 McAfee, LLC.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
General Public License as published by the Free Software Foundation; version 2 of the License.
|
||||
|
||||
@@ -81,3 +81,20 @@ Some documentation about configure command for mysql:
|
||||
|
||||
http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html
|
||||
|
||||
|
||||
==== MariaDB 10.2.10 ======
|
||||
1. Firstly checkout the source code:-
|
||||
- svn co https://beasource3.corp.nai.org/svn/projects/DBSec-MySQL audit_plugin_mysql
|
||||
2. cd audit_plugin_mysql
|
||||
3. unzip zip-sources/mariadb-10.2.10.zip
|
||||
4. cd mariadb-10.2.10
|
||||
5. CC=gcc CXX=g++ cmake . -DBUILD_CONFIG=mysql_release -DGNUTLS_INCLUDE_DIR=./zip-sources/mariadb-10.2.10/gnutls-3.3.24/64b/include -DGNUTLS_LIBRARY=./zip-sources/mariadb-10.2.10/gnutls-3.3.24/64b/lib
|
||||
6. cd mariadb-10.2.10/libservices
|
||||
7. make
|
||||
8. cd ../extra
|
||||
9. make
|
||||
10. cd ../..
|
||||
11. chmod +x bootstrap.sh
|
||||
12. ./bootstrap.sh
|
||||
13. CXX='gcc -static-libgcc' CC='gcc -static-libgcc' MYSQL_AUDIT_PLUGIN_VERSION=1.1.7 MYSQL_AUDIT_PLUGIN_REVISION=`svn info|grep ^Revision|awk -F ": " '{print $2}'` ./configure --enable-debug=no --with-mysql=mariadb-10.2.10 --with-mysql-libservices=mariadb-10.2.10/libservices/libmysqlservices.a
|
||||
14. gmake <======== This will create the plugin "libaudit_plugin.so"
|
||||
|
||||
@@ -33,7 +33,7 @@ dnl
|
||||
dnl table_id.h included from table.h included by mysql_inc.h is
|
||||
dnl in libbinlogevents/include.
|
||||
AC_DEFINE([MYSQL_SRC], [1], [Source directory for MySQL])
|
||||
MYSQL_INC="-I$withval/sql -I$withval/libbinlogevents/export -I$withval/libbinlogevents/include -I$withval/include -I$withval/regex -I$withval"
|
||||
MYSQL_INC="-I$withval/sql -I$withval/libbinlogevents/export -I$withval/libbinlogevents/include -I$withval/include -I$withval/regex -I$withval -I$withval/extra/rapidjson/include"
|
||||
AC_MSG_RESULT(["$withval"])
|
||||
],
|
||||
[
|
||||
|
||||
@@ -96,8 +96,7 @@ AC_PATH_PROG(DIFF, diff, diff)
|
||||
#we can add the following flags for better error catching: -Werror -Wimplicit
|
||||
CPPFLAGS="$CPPFLAGS -Werror -Wall"
|
||||
CFLAGS="$CFLAGS -Wimplicit"
|
||||
# From MySQL: Disable exceptions as they seams to create problems with gcc and threads.
|
||||
CXXFLAGS="-fno-implicit-templates -fno-exceptions -fno-rtti -Wno-reorder -Wno-strict-aliasing"
|
||||
CXXFLAGS="-fno-implicit-templates -fno-strict-aliasing"
|
||||
|
||||
#add pthread libs
|
||||
LIBS="$LIBS -lpthread"
|
||||
|
||||
@@ -69,7 +69,7 @@ typedef size_t OFFSET;
|
||||
|
||||
// mysql max identifier is 64 so 2*64 + . and null
|
||||
#define MAX_OBJECT_CHAR_NUMBERS 131
|
||||
#define MAX_USER_CHAR_NUMBERS 20
|
||||
#define MAX_USER_CHAR_NUMBERS 32
|
||||
#define MAX_NUM_OBJECT_ELEM 256
|
||||
#define MAX_NUM_USER_ELEM 256
|
||||
|
||||
@@ -104,6 +104,7 @@ typedef struct ThdOffsets {
|
||||
OFFSET stmt_da;
|
||||
OFFSET da_status;
|
||||
OFFSET da_sql_errno;
|
||||
OFFSET view_tables;
|
||||
} ThdOffsets;
|
||||
|
||||
/*
|
||||
@@ -224,7 +225,9 @@ public:
|
||||
virtual ssize_t stop_msg_format(IWriter *writer) { return 0; }
|
||||
|
||||
static const char *retrieve_object_type(TABLE_LIST *pObj);
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
static QueryTableInf *getQueryCacheTableList1(THD *thd);
|
||||
#endif
|
||||
|
||||
// utility functions for fetching thd stuff
|
||||
static int thd_client_port(THD *thd);
|
||||
@@ -438,7 +441,7 @@ static inline const CHARSET_INFO * pfs_connect_attrs_cs(void * pfs)
|
||||
// major, minor, patch);
|
||||
}
|
||||
|
||||
if ( ( major == 5 && ( (minor == 6 && patch >= 15) || minor >= 7) ) // MySQL
|
||||
if ( ( major == 5 && ( (minor == 6 && patch >= 15) || minor >= 7) ) || (major == 8) // MySQL
|
||||
|| ( major == 10 && ( (minor == 0 && patch >= 11) || minor >= 1) ) ) // MariaDB
|
||||
{
|
||||
uint cs_number = *(uint *) (((unsigned char *) pfs) + Audit_formatter::thd_offsets.pfs_connect_attrs_cs);
|
||||
@@ -579,7 +582,10 @@ static inline const CHARSET_INFO * pfs_connect_attrs_cs(void * pfs)
|
||||
|
||||
static inline bool table_is_view(TABLE_LIST *table)
|
||||
{
|
||||
return table->view_tables != 0;
|
||||
if (!Audit_formatter::thd_offsets.view_tables)
|
||||
return table->view_tables != 0;
|
||||
List<TABLE_LIST> **view_tables = (List<TABLE_LIST> **)((char*)table + Audit_formatter::thd_offsets.view_tables);
|
||||
return *view_tables;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -592,14 +598,14 @@ public:
|
||||
static const char *DEF_MSG_DELIMITER;
|
||||
|
||||
Audit_json_formatter()
|
||||
: m_msg_delimiter(NULL),
|
||||
m_write_start_msg(true),
|
||||
: m_write_start_msg(true),
|
||||
m_write_sess_connect_attrs(true),
|
||||
m_write_client_capabilities(false),
|
||||
m_write_socket_creds(true),
|
||||
m_password_mask_regex_preg(NULL),
|
||||
m_perform_password_masking(NULL),
|
||||
m_msg_delimiter(NULL),
|
||||
m_password_mask_regex_compiled(false),
|
||||
m_perform_password_masking(NULL)
|
||||
m_password_mask_regex_preg(NULL)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -706,8 +712,12 @@ public:
|
||||
static void stop_all();
|
||||
|
||||
Audit_handler() :
|
||||
m_initialized(false), m_enabled(false), m_print_offset_err(true),
|
||||
m_formatter(NULL), m_failed(false), m_log_io_errors(true)
|
||||
m_formatter()
|
||||
,m_initialized()
|
||||
,m_enabled()
|
||||
,m_failed()
|
||||
,m_log_io_errors(true)
|
||||
,m_print_offset_err(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -873,7 +883,10 @@ class Audit_file_handler: public Audit_io_handler {
|
||||
public:
|
||||
|
||||
Audit_file_handler() :
|
||||
m_sync_period(0), m_log_file(NULL), m_sync_counter(0), m_bufsize(0)
|
||||
m_sync_period(0)
|
||||
, m_bufsize(0)
|
||||
, m_log_file(NULL)
|
||||
, m_sync_counter(0)
|
||||
{
|
||||
m_io_type = "file";
|
||||
}
|
||||
@@ -920,8 +933,10 @@ class Audit_socket_handler: public Audit_io_handler {
|
||||
public:
|
||||
|
||||
Audit_socket_handler() :
|
||||
m_vio(NULL), m_connect_timeout(1), m_write_timeout(0),
|
||||
m_log_with_error_severity(false)
|
||||
m_connect_timeout(1)
|
||||
, m_write_timeout()
|
||||
, m_vio()
|
||||
, m_log_with_error_severity()
|
||||
{
|
||||
m_io_type = "socket";
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* Created on: Jan 10, 2011
|
||||
* Author: Guyl
|
||||
*/
|
||||
|
||||
#ifndef HOT_PATCH_H_
|
||||
#define HOT_PATCH_H_
|
||||
|
||||
@@ -14,9 +13,14 @@
|
||||
|
||||
#define GETPAGESIZE() sysconf (_SC_PAGE_SIZE)
|
||||
|
||||
int hot_patch_function(void* targetFunction, void* newFunction, void* trampolineFunction, unsigned int *trampolinesize, unsigned int *usedsize, bool log_info);
|
||||
struct SavedCode {
|
||||
char code [1024];
|
||||
size_t size;
|
||||
};
|
||||
|
||||
void remove_hot_patch_function(void* targetFunction, void* trampolineFunction, unsigned int trampolinesize, bool log_info);
|
||||
int hot_patch_function(void* targetFunction, void* newFunction, void* trampolineFunction, unsigned int *trampolinesize, unsigned int *usedsize, bool log_info, SavedCode* saved_code);
|
||||
|
||||
void remove_hot_patch_function(void* targetFunction, void* trampolineFunction, unsigned int trampolinesize, bool log_info, SavedCode* saved_code);
|
||||
|
||||
//8KB NOP + 16
|
||||
//can be used to define a block of memory to use for trampolines
|
||||
|
||||
@@ -33,7 +33,26 @@
|
||||
|
||||
#include <sql_parse.h>
|
||||
#include <sql_class.h>
|
||||
#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80019
|
||||
#include <mysql/components/services/mysql_connection_attributes_iterator.h>
|
||||
#include <mysql/components/my_service.h>
|
||||
#include <mysql/service_plugin_registry.h>
|
||||
#endif
|
||||
#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80000
|
||||
using my_bool = bool;
|
||||
#if MYSQL_VERSION_ID < 80012
|
||||
#define PLUGIN_VAR_NOSYSVAR 0x0400
|
||||
#endif
|
||||
#include <sql/item.h>
|
||||
#include <sql/log.h>
|
||||
#include <sql/log_event.h>
|
||||
#include <sql/mysqld.h>
|
||||
#include <sql/protocol.h>
|
||||
#include <sql/sql_lex.h>
|
||||
#else
|
||||
#include <my_global.h>
|
||||
typedef struct st_mysql_sys_var SYS_VAR;
|
||||
#endif
|
||||
#include <sql_connect.h>
|
||||
#include <sql/sql_base.h>
|
||||
#include <sql/sql_table.h>
|
||||
@@ -73,10 +92,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// MariaDB doesn't have my_getsystime (returns 100 nano seconds) function. They replaced with my_hrtime_t my_hrtime() which returns microseconds
|
||||
#if defined(MARIADB_BASE_VERSION)
|
||||
|
||||
#define my_getsystime() ((my_hrtime()).val * 10)
|
||||
#if defined(MARIADB_BASE_VERSION)
|
||||
// MariaDB has a kill service that overrides thd_killed as a macro. It also has thd_killed function defined for backwards compatibility, so we redefine it.
|
||||
#undef thd_killed
|
||||
extern "C" int thd_killed(const MYSQL_THD thd);
|
||||
@@ -85,7 +101,6 @@ extern "C" int thd_killed(const MYSQL_THD thd);
|
||||
#if MYSQL_VERSION_ID >= 100010
|
||||
extern "C" char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length, unsigned int max_query_len);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//Define HAVE_SESS_CONNECT_ATTRS. We define it for mysql 5.6 and above
|
||||
@@ -93,4 +108,80 @@ extern "C" char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int
|
||||
#define HAVE_SESS_CONNECT_ATTRS 1
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
namespace compat {
|
||||
/*************************/
|
||||
/* my_getsystime */
|
||||
/*************************/
|
||||
#if defined(MARIADB_BASE_VERSION)
|
||||
// MariaDB doesn't have my_getsystime (returns 100 nano seconds) function. They replaced with my_hrtime_t my_hrtime() which returns microseconds
|
||||
static inline unsigned long long int my_getsystime() { return (my_hrtime()).val * 10; }
|
||||
#elif MYSQL_VERSION_ID < 80000
|
||||
static inline unsigned long long int my_getsystime() { return ::my_getsystime(); }
|
||||
#else
|
||||
static inline unsigned long long int my_getsystime() {
|
||||
#ifdef HAVE_CLOCK_GETTIME
|
||||
// Performance regression testing showed this to be preferable
|
||||
struct timespec tp;
|
||||
clock_gettime(CLOCK_REALTIME, &tp);
|
||||
return (static_cast<unsigned long long int>(tp.tv_sec) * 10000000 +
|
||||
static_cast<unsigned long long int>(tp.tv_nsec) / 100);
|
||||
#else
|
||||
return std::chrono::duration_cast<
|
||||
std::chrono::duration<std::int64_t, std::ratio<1, 10000000>>>(
|
||||
UTC_clock::now().time_since_epoch())
|
||||
.count();
|
||||
#endif /* HAVE_CLOCK_GETTIME */
|
||||
}
|
||||
#endif
|
||||
|
||||
/*********************************************/
|
||||
/* vio_socket_connect */
|
||||
/*********************************************/
|
||||
#if MYSQL_VERSION_ID >= 50600
|
||||
#ifndef MYSQL_VIO
|
||||
#define MYSQL_VIO Vio*
|
||||
#endif
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
static inline bool vio_socket_connect(MYSQL_VIO vio, struct sockaddr *addr, socklen_t len, int timeout)
|
||||
{
|
||||
return ::vio_socket_connect(vio, addr, len, timeout);
|
||||
}
|
||||
#else
|
||||
/*********************************************/
|
||||
/* */
|
||||
/* resolve the symbols manualy to permit */
|
||||
/* loading of the plugin in their absence */
|
||||
/* */
|
||||
/*********************************************/
|
||||
extern bool (*_vio_socket_connect)(MYSQL_VIO vio, struct sockaddr *addr, socklen_t len, int timeout);
|
||||
extern bool (*_vio_socket_connect_80016)(MYSQL_VIO vio, struct sockaddr *addr, socklen_t len, bool nonblocking, int timeout);
|
||||
extern bool (*_vio_socket_connect_80020)(MYSQL_VIO vio, struct sockaddr *addr, socklen_t len, bool nonblocking, int timeout, bool *connect_done);
|
||||
|
||||
static inline bool vio_socket_connect(MYSQL_VIO vio, struct sockaddr *addr, socklen_t len, int timeout)
|
||||
{
|
||||
if (_vio_socket_connect) return _vio_socket_connect(vio, addr, len, timeout);
|
||||
if (_vio_socket_connect_80016) return _vio_socket_connect_80016(vio, addr, len, false, timeout);
|
||||
if (_vio_socket_connect_80020) return _vio_socket_connect_80020(vio, addr, len, false, timeout, nullptr);
|
||||
return true;
|
||||
}
|
||||
static inline bool init()
|
||||
{
|
||||
void* handle = dlopen(NULL, RTLD_LAZY);
|
||||
if (!handle)
|
||||
return false;
|
||||
_vio_socket_connect = (decltype(_vio_socket_connect))dlsym(handle, "_Z18vio_socket_connectP3VioP8sockaddrji");
|
||||
_vio_socket_connect_80016 = (decltype(_vio_socket_connect_80016))dlsym(handle, "_Z18vio_socket_connectP3VioP8sockaddrjbi");
|
||||
_vio_socket_connect_80020 = (decltype(_vio_socket_connect_80020))dlsym(handle, "_Z18vio_socket_connectP3VioP8sockaddrjbiPb");
|
||||
dlclose(handle);
|
||||
return _vio_socket_connect || _vio_socket_connect_80016 || _vio_socket_connect_80020;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // MYSQL_INCL_H
|
||||
|
||||
@@ -32,7 +32,7 @@ DB=db
|
||||
CLIENT_CAPS="print_offset THD client_capabilities"
|
||||
|
||||
# In 5.6 command member is named m_command
|
||||
if echo $MYVER | grep -P '^(5\.6|5\.7|10\.)' > /dev/null
|
||||
if echo $MYVER | grep -P '^(5\.6|5\.7|8\.|10\.)' > /dev/null
|
||||
then
|
||||
COMMAND_MEMBER=m_command
|
||||
HAS_CONNECT_ATTRS=yes
|
||||
@@ -40,7 +40,7 @@ fi
|
||||
|
||||
CONNECT_ATTRS_CS=m_session_connect_attrs_cs
|
||||
# In 5.7 thread_id changed to m_thread_id. main_security_ctx changed to m_main_security_ctx
|
||||
if echo $MYVER | grep -P '^(5\.7)' > /dev/null
|
||||
if echo $MYVER | grep -P '^(5\.7|8\.)' > /dev/null
|
||||
then
|
||||
THREAD_ID=m_thread_id
|
||||
SEC_CONTEXT=m_main_security_ctx
|
||||
@@ -59,7 +59,7 @@ fi
|
||||
|
||||
# In 5.6.15 and up, 5.7 and mariabdb 10.0.11 and up, mariadb 10.1
|
||||
# m_session_connect_attrs_cs changed to m_session_connect_attrs_cs_number
|
||||
if echo $MYVER | grep -P '^(5\.7|10\.[1-2]|5\.6\.(1[5-9]|[2-9][0-9])|10.0.(1[1-9]|[2-9][0-9]))' > /dev/null
|
||||
if echo $MYVER | grep -P '^(5\.7|8\.|10\.[1-2]|5\.6\.(1[5-9]|[2-9][0-9])|10.0.(1[1-9]|[2-9][0-9]))' > /dev/null
|
||||
then
|
||||
CONNECT_ATTRS_CS=m_session_connect_attrs_cs_number
|
||||
fi
|
||||
@@ -75,7 +75,7 @@ else
|
||||
CONNECT_ATTRS='printf ", 0, 0, 0"'
|
||||
fi
|
||||
|
||||
if echo $MYVER | grep -P '^5\.7' > /dev/null
|
||||
if echo $MYVER | grep -P '^(5\.7|8\.0)' > /dev/null
|
||||
then
|
||||
if echo $MYVER | grep -P '^5\.7\.8' > /dev/null
|
||||
then
|
||||
@@ -115,7 +115,7 @@ DA_STATUS="print_offset Diagnostics_area m_status" # 5.5, 5.6, 5.7, mariadb 10.
|
||||
DA_SQL_ERRNO="print_offset Diagnostics_area m_sql_errno" # 5.5, 5.6, mariadb 10.0, 10.1, 10.2
|
||||
STMT_DA="print_offset THD m_stmt_da" # 5.6, 5.7, mariadb 10.0, 10.1, 10.2
|
||||
|
||||
if echo $MYVER | grep -P '^(5\.7)' > /dev/null
|
||||
if echo $MYVER | grep -P '^(5\.7|8\.0)' > /dev/null
|
||||
then
|
||||
DA_SQL_ERRNO="print_offset Diagnostics_area m_mysql_errno"
|
||||
elif echo $MYVER | grep -P '^(5\.6|10\.)' > /dev/null
|
||||
@@ -130,6 +130,17 @@ else
|
||||
DA_SQL_ERRNO='printf ", 0"'
|
||||
fi
|
||||
|
||||
LEX_COMMENT=""
|
||||
VIEW_TABLES=""
|
||||
if echo $MYVER | grep -P '^(8\.0)' > /dev/null
|
||||
then
|
||||
LEX_COMMENT='printf ", 0"'
|
||||
VIEW_TABLES="print_offset TABLE_LIST view_tables"
|
||||
else
|
||||
LEX_COMMENT="print_offset LEX comment"
|
||||
VIEW_TABLES='printf ", 0"'
|
||||
fi
|
||||
|
||||
cat <<EOF > offsets.gdb
|
||||
set logging on
|
||||
set width 0
|
||||
@@ -142,7 +153,7 @@ print_offset THD $THREAD_ID
|
||||
print_offset THD $SEC_CONTEXT
|
||||
print_offset THD $COMMAND_MEMBER
|
||||
print_offset THD lex
|
||||
print_offset LEX comment
|
||||
$LEX_COMMENT
|
||||
print_offset Security_context $USER
|
||||
print_offset Security_context $HOST
|
||||
print_offset Security_context $IP
|
||||
@@ -159,6 +170,7 @@ $ROW_COUNT_FUNC
|
||||
$STMT_DA
|
||||
$DA_STATUS
|
||||
$DA_SQL_ERRNO
|
||||
$VIEW_TABLES
|
||||
printf "}"
|
||||
EOF
|
||||
|
||||
|
||||
@@ -508,7 +508,7 @@ int Audit_socket_handler::open(const char *io_dest, bool log_errors)
|
||||
m_connect_timeout))
|
||||
#else
|
||||
// in 5.6 timeout is in ms
|
||||
if (vio_socket_connect((Vio*)m_vio,(struct sockaddr *) &UNIXaddr, sizeof(UNIXaddr),
|
||||
if (compat::vio_socket_connect((Vio*)m_vio,(struct sockaddr *) &UNIXaddr, sizeof(UNIXaddr),
|
||||
m_connect_timeout * 1000))
|
||||
#endif
|
||||
{
|
||||
@@ -585,7 +585,7 @@ static void yajl_add_uint64(yajl_gen gen, const char *name, uint64 num)
|
||||
{
|
||||
const size_t max_int64_str_len = 21;
|
||||
char buf[max_int64_str_len];
|
||||
snprintf(buf, max_int64_str_len, "%llu", num);
|
||||
snprintf(buf, max_int64_str_len, "%llu", (unsigned long long)num);
|
||||
yajl_add_string_val(gen, name, buf);
|
||||
}
|
||||
|
||||
@@ -622,8 +622,11 @@ static const char *retrieve_user(THD *thd)
|
||||
// starting with MySQL version 5.1.41 thd_query_string is added
|
||||
// And at 5.7 it changed
|
||||
#if ! defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 50709
|
||||
|
||||
#if MYSQL_VERSION_ID >= 80000
|
||||
extern LEX_CSTRING thd_query_unsafe(MYSQL_THD thd);
|
||||
#else
|
||||
extern "C" LEX_CSTRING thd_query_unsafe(MYSQL_THD thd);
|
||||
#endif
|
||||
|
||||
static const char *thd_query_str(THD *thd, size_t *len)
|
||||
{
|
||||
@@ -694,7 +697,7 @@ ssize_t Audit_json_formatter::start_msg_format(IWriter *writer)
|
||||
yajl_gen gen = yajl_gen_alloc(NULL);
|
||||
yajl_gen_map_open(gen);
|
||||
yajl_add_string_val(gen, "msg-type", "header");
|
||||
uint64 ts = my_getsystime() / (10000);
|
||||
uint64 ts = compat::my_getsystime() / (10000);
|
||||
yajl_add_uint64(gen, "date", ts);
|
||||
yajl_add_string_val(gen, "audit-version", MYSQL_AUDIT_PLUGIN_VERSION "-" MYSQL_AUDIT_PLUGIN_REVISION);
|
||||
yajl_add_string_val(gen, "audit-protocol-version", AUDIT_PROTOCOL_VERSION);
|
||||
@@ -758,6 +761,7 @@ static const char *replace_in_string(THD *thd,
|
||||
#ifdef HAVE_SESS_CONNECT_ATTRS
|
||||
#include <storage/perfschema/pfs_instr.h>
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
//declare the function: parse_length_encoded_string from: storage/perfschema/table_session_connect.cc
|
||||
bool parse_length_encoded_string(const char **ptr,
|
||||
char *dest, uint dest_size,
|
||||
@@ -767,6 +771,72 @@ bool parse_length_encoded_string(const char **ptr,
|
||||
const CHARSET_INFO *from_cs,
|
||||
uint nchars_max);
|
||||
|
||||
#else
|
||||
// the function is not exported in MySQL 8
|
||||
/**
|
||||
Take a length encoded string
|
||||
|
||||
@arg ptr inout the input string array
|
||||
@arg dest where to store the result
|
||||
@arg dest_size max size of @c dest
|
||||
@arg copied_len the actual length of the data copied
|
||||
@arg start_ptr pointer to the start of input
|
||||
@arg input_length the length of the incoming data
|
||||
@arg from_cs character set in which @c ptr is encoded
|
||||
@arg nchars_max maximum number of characters to read
|
||||
@return status
|
||||
@retval true parsing failed
|
||||
@retval false parsing succeeded
|
||||
*/
|
||||
static bool parse_length_encoded_string(
|
||||
const char **ptr
|
||||
,char *dest
|
||||
,uint dest_size
|
||||
,uint *copied_len
|
||||
,const char *start_ptr
|
||||
,uint input_length
|
||||
,bool /* unused */
|
||||
,const CHARSET_INFO *from_cs
|
||||
,uint nchars_max
|
||||
)
|
||||
{
|
||||
ulong copy_length, data_length;
|
||||
const char *well_formed_error_pos = NULL, *cannot_convert_error_pos = NULL,
|
||||
*from_end_pos = NULL;
|
||||
|
||||
copy_length = data_length = net_field_length((uchar **)ptr);
|
||||
|
||||
/* we don't tolerate NULL as a length */
|
||||
if (data_length == NULL_LENGTH) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*ptr - start_ptr + data_length > input_length) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: Migrate the data itself to UTF8MB4,
|
||||
this is still UTF8MB3 printed in a UTF8MB4 column.
|
||||
*/
|
||||
copy_length = well_formed_copy_nchars(
|
||||
&my_charset_utf8_bin
|
||||
, dest
|
||||
, dest_size
|
||||
, from_cs
|
||||
, *ptr
|
||||
, data_length
|
||||
, nchars_max
|
||||
, &well_formed_error_pos
|
||||
, &cannot_convert_error_pos
|
||||
, &from_end_pos
|
||||
);
|
||||
*copied_len = copy_length;
|
||||
(*ptr) += data_length;
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* Code based upon read_nth_attribute of storage/perfschema/table_session_connect.cc
|
||||
* Only difference we do once loop and write out the attributes
|
||||
@@ -782,9 +852,10 @@ static void log_session_connect_attrs(yajl_gen gen, THD *thd)
|
||||
const uint max_idx = 32;
|
||||
uint idx;
|
||||
const char *ptr;
|
||||
bool array_start = false;
|
||||
// bool array_start = false;
|
||||
if(!connect_attrs || !connect_attrs_length || !connect_attrs_cs)
|
||||
{
|
||||
sql_print_information("%s Failed to compute offsets connect_attrs. pfs [%p], connect_attrs [%p], connect_attrs_length [%d], connect_attrs_cs [%p]", AUDIT_LOG_PREFIX, pfs, connect_attrs, connect_attrs_length, connect_attrs_cs);
|
||||
//either offsets are wrong or not set
|
||||
return;
|
||||
}
|
||||
@@ -812,6 +883,7 @@ static void log_session_connect_attrs(yajl_gen gen, THD *thd)
|
||||
connect_attrs_cs, MAX_COPY_CHARS_NAME) || !copy_length)
|
||||
{
|
||||
//something went wrong or we are done
|
||||
// sql_print_information("%s something went wrong or we are done 1", AUDIT_LOG_PREFIX);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -825,23 +897,14 @@ static void log_session_connect_attrs(yajl_gen gen, THD *thd)
|
||||
fill_in_attr_value,
|
||||
connect_attrs_cs, MAX_COPY_CHARS_VAL) || !copy_length)
|
||||
{
|
||||
// sql_print_information("%s something went wrong or we are done 2", AUDIT_LOG_PREFIX);
|
||||
break;
|
||||
}
|
||||
attr_value_length= copy_length;
|
||||
if(!array_start)
|
||||
{
|
||||
yajl_add_string(gen, "connect_attrs");
|
||||
yajl_gen_map_open(gen);
|
||||
array_start = true;
|
||||
}
|
||||
yajl_gen_string(gen, (const unsigned char*)attr_name, attr_name_length);
|
||||
yajl_gen_string(gen, (const unsigned char*)attr_value, attr_value_length);
|
||||
|
||||
} //close for loop
|
||||
if(array_start)
|
||||
{
|
||||
yajl_gen_map_close(gen);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -861,7 +924,7 @@ ssize_t Audit_json_formatter::event_format(ThdSesData *pThdData, IWriter *writer
|
||||
// TODO: get the start date from THD (but it is not in millis. Need to think about how we handle this)
|
||||
// for now simply use the current time.
|
||||
// my_getsystime() time since epoc in 100 nanosec units. Need to devide by 1000*(1000/100) to reach millis
|
||||
uint64 ts = my_getsystime() / (10000);
|
||||
uint64 ts = compat::my_getsystime() / (10000);
|
||||
yajl_add_uint64(gen, "date", ts);
|
||||
yajl_add_uint64(gen, "thread-id", thdid);
|
||||
yajl_add_uint64(gen, "query-id", qid);
|
||||
@@ -1077,10 +1140,19 @@ ssize_t Audit_json_formatter::event_format(ThdSesData *pThdData, IWriter *writer
|
||||
}
|
||||
|
||||
ThdSesData::ThdSesData(THD *pTHD, StatementSource source)
|
||||
: m_pThd (pTHD), m_CmdName(NULL), m_UserName(NULL),
|
||||
m_objIterType(OBJ_NONE), m_tables(NULL), m_firstTable(true),
|
||||
m_tableInf(NULL), m_index(0), m_isSqlCmd(false),
|
||||
m_port(-1), m_source(source), m_errorCode(0), m_setErrorCode(false)
|
||||
: m_pThd (pTHD)
|
||||
, m_CmdName()
|
||||
, m_UserName()
|
||||
, m_isSqlCmd()
|
||||
, m_objIterType(OBJ_NONE)
|
||||
, m_tables()
|
||||
, m_firstTable(true)
|
||||
, m_tableInf()
|
||||
, m_index()
|
||||
, m_source(source)
|
||||
, m_port(-1)
|
||||
, m_errorCode()
|
||||
, m_setErrorCode()
|
||||
{
|
||||
m_CmdName = retrieve_command (m_pThd, m_isSqlCmd);
|
||||
m_UserName = retrieve_user (m_pThd);
|
||||
@@ -1109,15 +1181,17 @@ bool ThdSesData::startGetObjects()
|
||||
m_tables = NULL;
|
||||
m_firstTable = true;
|
||||
m_index = 0;
|
||||
m_tableInf = Audit_formatter::getQueryCacheTableList1(getTHD());
|
||||
int command = Audit_formatter::thd_inst_command(getTHD());
|
||||
LEX *pLex = Audit_formatter::thd_lex(getTHD());
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
// query cache case
|
||||
m_tableInf = Audit_formatter::getQueryCacheTableList1(getTHD());
|
||||
if (pLex && command == COM_QUERY && m_tableInf && m_tableInf->num_of_elem > 0)
|
||||
{
|
||||
m_objIterType = OBJ_QUERY_CACHE;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
const char *cmd = getCmdName();
|
||||
// commands which have single database object
|
||||
if (strcmp(cmd,"Init DB") == 0
|
||||
|
||||
@@ -25,6 +25,32 @@
|
||||
const ThdOffsets thd_offsets_arr[] =
|
||||
{
|
||||
/* +++ PERCONA 64 OFFSETS GO HERE +++ */
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.31-34)
|
||||
{"5.7.31-34","6aacc4359af48e07145187bd8b590a43", 8360, 8424, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8556, 4656, 3648, 3656, 3660, 6560, 2088, 8, 7592, 7632, 7616, 14328, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.30-33)
|
||||
{"5.7.30-33","9ca6e80ea4c210aee6bb39116f38c0c2", 8360, 8424, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8556, 4656, 3648, 3656, 3660, 6560, 2088, 8, 7592, 7632, 7616, 14328, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.29-32)
|
||||
{"5.7.29-32","09e9c392e9be8499026f12407358bdab", 8360, 8424, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8556, 4656, 3648, 3656, 3660, 6560, 2088, 8, 7592, 7632, 7616, 14328, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.28-31)
|
||||
{"5.7.28-31","0b464e1bd825128da4d263fc4b531cb1", 8360, 8424, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8556, 4656, 3648, 3656, 3660, 6560, 2088, 8, 7592, 7632, 7616, 14328, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.27-30)
|
||||
{"5.7.27-30","815ef6b339dbd55eb776a811b61b93fb", 8360, 8424, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8556, 4656, 3648, 3656, 3660, 6560, 2088, 8, 7592, 7632, 7616, 14328, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.26-29)
|
||||
{"5.7.26-29","a137d1d93fe1d5553370426412d67249", 8312, 8376, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8508, 4656, 3648, 3656, 3660, 6512, 2088, 8, 7544, 7584, 7568, 14280, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.25-28)
|
||||
{"5.7.25-28","6a4e7d9fb6c932541d48d0ef3826d96c", 8312, 8376, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8508, 4656, 4032, 4040, 4044, 6512, 2088, 8, 7544, 7584, 7568, 14280, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.24-27)
|
||||
{"5.7.24-27","259d73b53da7d6f8517147992ba6db88", 8312, 8376, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8508, 4656, 4032, 4040, 4044, 6512, 2088, 8, 7544, 7584, 7568, 14272, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.24-26)
|
||||
{"5.7.24-26","3f06a93efcd5283b6d30f03263cc7508", 8312, 8376, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8508, 4656, 4032, 4040, 4044, 6512, 2088, 8, 7544, 7584, 7568, 14272, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.23-25)
|
||||
{"5.7.23-25","1b61ec9b9558a9a739347285992d6ae1", 8312, 8376, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8508, 4656, 4032, 4040, 4044, 6512, 2088, 8, 7544, 7584, 7568, 14272, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.23-24)
|
||||
{"5.7.23-24","e85ecb52a2edd0b446032cea67428595", 8312, 8376, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8508, 4656, 4032, 4040, 4044, 6512, 2088, 8, 7544, 7584, 7568, 14272, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.23-23)
|
||||
{"5.7.23-23","dcffbf5ec3e4fe87c36b29f1a9fe22fc", 8312, 8376, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8508, 4656, 4032, 4040, 4044, 6512, 2080, 8, 7544, 7584, 7568, 14264, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.22-22)
|
||||
{"5.7.22-22","caa0a7ded8a1599d40707e40937dd02e", 8304, 8368, 3928, 5088, 456, 360, 0, 32, 64, 160, 536, 8500, 4656, 3648, 3656, 3660, 6504, 2080, 8, 7536, 7576, 7560, 14256, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.21-20)
|
||||
{"5.7.21-20","d0816b67f96d9275eca4e186ef97065d", 8296, 8360, 3928, 5080, 456, 360, 0, 32, 64, 160, 536, 8492, 4656, 3648, 3656, 3660, 6496, 2080, 8, 7528, 7568, 7552, 14240, 148, 672},
|
||||
//offsets for: /perconarpm/usr/sbin/mysqld (5.7.20-19)
|
||||
@@ -39,6 +65,80 @@ const ThdOffsets thd_offsets_arr[] =
|
||||
const ThdOffsets thd_offsets_arr[] =
|
||||
{
|
||||
/* +++ MYSQL 64 OFFSETS GO HERE +++ */
|
||||
//offsets for: /mysqlrpm/5.6.50/usr/sbin/mysqld (5.6.50)
|
||||
{"5.6.50","7f4faea987f15f3f81235ec4b38d1f5e", 7000, 7048, 4008, 4528, 72, 2704, 96, 0, 32, 104, 136, 7136, 4400, 2800, 2808, 2812, 536, 0, 0, 6368, 6392, 6376, 13056, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.32/usr/sbin/mysqld (5.7.32)
|
||||
{"5.7.32","12356fea007b09247c10d0efb34b0a59", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13472, 148, 672},
|
||||
//offsets for: ./mysqld-8.0.22 (8.0.22)
|
||||
{"8.0.22","d33b22129504158cacdad5664d21a4a5", 8672, 8720, 4056, 5664, 520, 0, 0, 32, 64, 160, 600, 8836, 5296, 4208, 4216, 4220, 6968, 1600, 32, 7928, 7968, 7952, 11760, 140, 664, 320},
|
||||
//offsets for: ./mysqld-8.0.21 (8.0.21)
|
||||
{"8.0.21","93b401ddbe0484ac527524e8da26d02f", 8656, 8704, 4040, 5648, 520, 0, 0, 32, 64, 160, 600, 8820, 5280, 4200, 4208, 4212, 6952, 1592, 40, 7912, 7952, 7936, 11744, 140, 664, 328},
|
||||
//offsets for: ./mysqld-8.0.20 (8.0.20)
|
||||
{"8.0.20","d0cb4bd30cd1a325c24313d8edd4530b", 8656, 8704, 4040, 5648, 520, 0, 0, 32, 64, 160, 600, 8820, 5280, 4200, 4208, 4212, 6952, 1544, 40, 7912, 7952, 7936, 11744, 140, 664, 328},
|
||||
//offsets for: ./mysqld-8.0.19 (8.0.19)
|
||||
{"8.0.19","3e06dfd8490afdcd0075ef1395891ae8", 8632, 8680, 4016, 5624, 520, 0, 0, 32, 64, 160, 600, 8796, 5256, 4200, 4208, 4212, 6928, 1544, 40, 7888, 7928, 7912, 11696, 140, 664, 328},
|
||||
//offsets for: ./mysqld-8.0.18 (8.0.18)
|
||||
{"8.0.18","172a119d1acf6a743d155de9d9433124", 8608, 8656, 3992, 5600, 520, 0, 0, 32, 64, 160, 600, 8772, 5232, 4200, 4208, 4212, 6904, 1504, 40, 7864, 7904, 7888, 11672, 140, 664, 328},
|
||||
//offsets for: ./mysqld-8.0.17 (8.0.17)
|
||||
{"8.0.17","0feb95f129f62fa3350c6895d556e7d9", 8744, 8792, 3912, 5736, 520, 0, 0, 32, 64, 160, 600, 8908, 5368, 4200, 4208, 4212, 7040, 1456, 40, 8000, 8040, 8024, 11808, 140, 664, 328},
|
||||
//offsets for: ./mysqld-8.0.16 (8.0.16)
|
||||
{"8.0.16","ab69e3d19774ad65491dea8a722e6af1", 8360, 8408, 3912, 5352, 520, 0, 0, 32, 64, 160, 600, 8524, 4984, 4000, 4008, 4012, 6656, 1456, 40, 7616, 7656, 7640, 11416, 140, 664, 328},
|
||||
//offsets for: ./mysqld-8.0.15 (8.0.15)
|
||||
{"8.0.15","aa0a7deef2aaba81b081e4e498859af1", 8136, 8184, 3936, 5120, 520, 0, 0, 32, 64, 160, 600, 8300, 4752, 4000, 4008, 4012, 6424, 1424, 24, 7392, 7432, 7416, 11192, 140, 664, 328},
|
||||
//offsets for: ./mysqld-8.0.14 (8.0.14)
|
||||
{"8.0.14","649589cdd3e5b56f72790793a039e924", 8136, 8184, 3936, 5120, 520, 0, 0, 32, 64, 160, 600, 8300, 4752, 4000, 4008, 4012, 6424, 1424, 24, 7392, 7432, 7416, 11192, 140, 664, 328},
|
||||
//offsets for: ./mysqld-8.0.13 (8.0.13)
|
||||
{"8.0.13","665c9cb36af00034f1d3e8823e50f028", 8112, 8160, 3912, 5096, 520, 0, 0, 32, 64, 160, 600, 8276, 4728, 4000, 4008, 4012, 6400, 1424, 24, 7360, 7408, 7392, 11144, 140, 664, 328},
|
||||
//offsets for: ./mysqld-8.0.12 (8.0.12)
|
||||
{"8.0.12","261db244348c9750a6a08a12c36ecbbe", 8112, 8160, 3888, 5096, 520, 0, 0, 32, 64, 160, 600, 8276, 4728, 3992, 4000, 4004, 6400, 1416, 24, 7360, 7408, 7392, 11144, 140, 664, 328},
|
||||
//offsets for: ./mysqld-8.0.11 (8.0.11)
|
||||
{"8.0.11","1e42c35650057a8c339ddf498808ca89", 8080, 8128, 3888, 5064, 520, 0, 0, 32, 64, 160, 600, 8244, 4696, 3992, 4000, 4004, 6368, 1416, 24, 7328, 7376, 7360, 11112, 140, 664, 328},
|
||||
//offsets for: /mysqlrpm/5.6.49/usr/sbin/mysqld (5.6.49)
|
||||
{"5.6.49","bd064dfd82d5e05499f6a77a87673919", 7000, 7048, 4008, 4528, 72, 2704, 96, 0, 32, 104, 136, 7136, 4400, 2800, 2808, 2812, 536, 0, 0, 6368, 6392, 6376, 13056, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.31/usr/sbin/mysqld (5.7.31)
|
||||
{"5.7.31","a61aff0065ab76c5d8c98547a1d263ca", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13472, 148, 672},
|
||||
//offsets for: /mysqlrpm/5.6.46/usr/sbin/mysqld (5.6.46)
|
||||
{"5.6.46","f61171f2e38d9d4d2aae64757070d978", 7000, 7048, 4008, 4528, 72, 2704, 96, 0, 32, 104, 136, 7136, 4400, 2800, 2808, 2812, 536, 0, 0, 6368, 6392, 6376, 13056, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.6.47/usr/sbin/mysqld (5.6.47)
|
||||
{"5.6.47","549f0e278d3556bfe58633ce225b189d", 7000, 7048, 4008, 4528, 72, 2704, 96, 0, 32, 104, 136, 7136, 4400, 2800, 2808, 2812, 536, 0, 0, 6368, 6392, 6376, 13056, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.6.48/usr/sbin/mysqld (5.6.48)
|
||||
{"5.6.48","d1617f9dc54fcc2d72b0adec6aef3c77", 7000, 7048, 4008, 4528, 72, 2704, 96, 0, 32, 104, 136, 7136, 4400, 2800, 2808, 2812, 536, 0, 0, 6368, 6392, 6376, 13056, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.30/usr/sbin/mysqld (5.7.30)
|
||||
{"5.7.30","eac501d6343901af6618e560acfaf2ed", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13472, 148, 672},
|
||||
//offsets for: /mysqlrpm/5.7.29/usr/sbin/mysqld (5.7.29)
|
||||
{"5.7.29","46aa02a6fd09fdcf6d3fecf46b5702e1", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13472, 148, 672},
|
||||
//offsets for: /mysqlrpm/5.7.28/usr/sbin/mysqld (5.7.28)
|
||||
{"5.7.28","90ee3ca7ce1ebd2568d36b736f29953b", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13472, 148, 672},
|
||||
//offsets for: /mysqlrpm/5.6.45/usr/sbin/mysqld (5.6.45)
|
||||
{"5.6.45","e3809543079babc8d7d466577f282a6e", 7000, 7048, 4008, 4528, 72, 2704, 96, 0, 32, 104, 136, 7136, 4400, 2800, 2808, 2812, 536, 0, 0, 6368, 6392, 6376, 13056, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.27/usr/sbin/mysqld (5.7.27)
|
||||
{"5.7.27","a9e8881fb2fb5dd6a9ee98281fac2071", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13472, 148, 672},
|
||||
//offsets for: /mysqlrpm/5.6.44/usr/sbin/mysqld (5.6.44)
|
||||
{"5.6.44","c3f51e2426f75dd07551d23d5f631cc6", 7000, 7048, 4008, 4528, 72, 2704, 96, 0, 32, 104, 136, 7136, 4400, 2800, 2808, 2812, 536, 0, 0, 6368, 6392, 6376, 13056, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.26/usr/sbin/mysqld (5.7.26)
|
||||
{"5.7.26","6810d7713e6bced7524fa54ca621a9ec", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13472, 148, 672},
|
||||
//offsets for: /mysqlrpm/5.6.43/usr/sbin/mysqld (5.6.43)
|
||||
{"5.6.43","9475a14433d66a8cedaaa76c6bb3d78e", 6992, 7040, 4000, 4520, 72, 2704, 96, 0, 32, 104, 136, 7128, 4392, 2800, 2808, 2812, 536, 0, 0, 6360, 6384, 6368, 13048, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.25/usr/sbin/mysqld (5.7.25)
|
||||
{"5.7.25","55b6a58bd6316b6e216c1a346d7de513", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13472, 148, 672},
|
||||
//offsets for: /mysqlrpm/5.5.62/usr/sbin/mysqld (5.5.62)
|
||||
{"5.5.62","185568238e4760cd5c1c79d2041cc897", 6144, 6192, 3816, 4312, 88, 2592, 96, 0, 32, 104, 120, 6264, 4192, 0, 0, 0, 512, 0, 0, 6008, 6032, 6016, 6072, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.6.42/usr/sbin/mysqld (5.6.42)
|
||||
{"5.6.42","3a4f1a5b289428cd4e766490acba8a05", 6992, 7040, 4000, 4520, 72, 2704, 96, 0, 32, 104, 136, 7128, 4392, 2800, 2808, 2812, 536, 0, 0, 6360, 6384, 6368, 13048, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.24/usr/sbin/mysqld (5.7.24)
|
||||
{"5.7.24","726d2c3500cc7a694ecc42030b246da0", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13464, 148, 672},
|
||||
//offsets for: /mysqlrpm/5.6.41/usr/sbin/mysqld (5.6.41)
|
||||
{"5.6.41","d0ffc8ceeab99ad7c6d5f97a68b2fbae", 6992, 7040, 4000, 4520, 72, 2704, 96, 0, 32, 104, 136, 7128, 4392, 2800, 2808, 2812, 536, 0, 0, 6360, 6384, 6368, 13048, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.23/usr/sbin/mysqld (5.7.23)
|
||||
{"5.7.23","479d22412ba7a34ddb16aa99f5a1f369", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13464, 148, 672},
|
||||
//offsets for: /mysqlrpm/5.5.61/usr/sbin/mysqld (5.5.61)
|
||||
{"5.5.61","ffaab811ce78e8b32c8cb084f4913a9e", 6144, 6192, 3816, 4312, 88, 2592, 96, 0, 32, 104, 120, 6264, 4192, 0, 0, 0, 512, 0, 0, 6008, 6032, 6016, 6072, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.5.60/usr/sbin/mysqld (5.5.60)
|
||||
{"5.5.60","60e9248ac9ab0c5a7a78af118644a943", 6144, 6192, 3816, 4312, 88, 2592, 96, 0, 32, 104, 120, 6264, 4192, 0, 0, 0, 512, 0, 0, 6008, 6032, 6016, 6072, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.6.40/usr/sbin/mysqld (5.6.40)
|
||||
{"5.6.40","516a3dfd5198c3231ff51aa825787b98", 6992, 7040, 4000, 4520, 72, 2704, 96, 0, 32, 104, 136, 7128, 4392, 2800, 2808, 2812, 536, 0, 0, 6360, 6384, 6368, 13048, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.22/usr/sbin/mysqld (5.7.22)
|
||||
{"5.7.22","8d6eccb0b07b7d4dde17b528625ffce7", 7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13464, 148, 672},
|
||||
//offsets for: /mysqlrpm/5.5.59/usr/sbin/mysqld (5.5.59)
|
||||
{"5.5.59","83f5b2bd751931e3aaf553f91b2c33f0", 6144, 6192, 3816, 4312, 88, 2592, 96, 0, 32, 104, 120, 6264, 4192, 0, 0, 0, 512, 0, 0, 6008, 6032, 6016, 6072, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.6.39/usr/sbin/mysqld (5.6.39)
|
||||
@@ -310,6 +410,108 @@ const ThdOffsets thd_offsets_arr[] =
|
||||
const ThdOffsets thd_offsets_arr[] =
|
||||
{
|
||||
/* +++ MARIADB 64 OFFSETS GO HERE +++ */
|
||||
//offsets for: /mariadb/10.2.36/bin/mysqld (10.2.36-MariaDB)
|
||||
{"10.2.36-MariaDB","6ac5d544938762b31b4972d099c85933", 13880, 13944, 6672, 8288, 88, 3208, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21216, 548, 516},
|
||||
//offsets for: /mariadb/10.2.35/bin/mysqld (10.2.35-MariaDB)
|
||||
{"10.2.35-MariaDB","9d1ec0f7809b672b0863d163a5c191d2", 13880, 13944, 6672, 8288, 88, 3208, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21216, 548, 516},
|
||||
//offsets for: /mariadb/10.1.48/bin/mysqld (10.1.48-MariaDB)
|
||||
{"10.1.48-MariaDB","cafecd98d429c4802dbda1234c6adbcf", 13712, 13776, 6488, 8096, 88, 3032, 8, 0, 16, 24, 152, 13868, 7864, 2984, 2992, 2996, 568, 0, 0, 13088, 13112, 13096, 20672, 548, 516},
|
||||
//offsets for: /mariadb/10.1.43/bin/mysqld (10.1.43-MariaDB)
|
||||
{"10.1.43-MariaDB","4de77f18da6c8086f743eac1f5db94b1", 13712, 13776, 6488, 8096, 88, 3040, 8, 0, 16, 24, 152, 13868, 7864, 2984, 2992, 2996, 568, 0, 0, 13088, 13112, 13096, 20680, 548, 516},
|
||||
//offsets for: /mariadb/10.2.27/bin/mysqld (10.2.27-MariaDB)
|
||||
{"10.2.27-MariaDB","a216829766a945325eece35408d911bb", 13880, 13944, 6672, 8288, 88, 3208, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21216, 548, 516},
|
||||
//offsets for: /mariadb/10.2.29/bin/mysqld (10.2.29-MariaDB)
|
||||
{"10.2.29-MariaDB","cb647967ccf176601e55c1fa7df4fd6f", 13880, 13944, 6672, 8288, 88, 3208, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21216, 548, 516},
|
||||
//offsets for: /mariadb/5.5.66/bin/mysqld (5.5.66-MariaDB)
|
||||
{"5.5.66-MariaDB","dd0aa7ad33051460119df0241eb61a32", 12032, 12096, 5800, 6904, 88, 2976, 8, 0, 16, 24, 152, 12168, 6784, 0, 0, 0, 536, 0, 0, 11888, 11912, 11896, 11960, 548, 516},
|
||||
//offsets for: /mariadb/10.1.47/bin/mysqld (10.1.47-MariaDB)
|
||||
{"10.1.47-MariaDB","0d5e0df36a5d55a5ff48a1a418c73aac", 13712, 13776, 6488, 8096, 88, 3032, 8, 0, 16, 24, 152, 13868, 7864, 2984, 2992, 2996, 568, 0, 0, 13088, 13112, 13096, 20672, 548, 516},
|
||||
//offsets for: /mariadb/10.2.34/bin/mysqld (10.2.34-MariaDB)
|
||||
{"10.2.34-MariaDB","9aad93c7cb827d2cb905a39733626293", 13880, 13944, 6672, 8288, 88, 3208, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21216, 548, 516},
|
||||
//offsets for: /mariadb/10.2.30/bin/mysqld (10.2.30-MariaDB)
|
||||
{"10.2.30-MariaDB","ba2ecaad20de3a74498721dbf19dde45", 13880, 13944, 6672, 8288, 88, 3208, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21216, 548, 516},
|
||||
//offsets for: /mariadb/10.2.33/bin/mysqld (10.2.33-MariaDB)
|
||||
{"10.2.33-MariaDB","508b3b5be1083bc2ab14a0cd99854f8b", 13880, 13944, 6672, 8288, 88, 3208, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21216, 548, 516},
|
||||
//offsets for: /mariadb/10.1.46/bin/mysqld (10.1.46-MariaDB)
|
||||
{"10.1.46-MariaDB","cacf06452e59833499660b0fdd9adad1", 13712, 13776, 6488, 8096, 88, 3032, 8, 0, 16, 24, 152, 13868, 7864, 2984, 2992, 2996, 568, 0, 0, 13088, 13112, 13096, 20672, 548, 516},
|
||||
//offsets for: /mariadb/10.2.31/bin/mysqld (10.2.31-MariaDB)
|
||||
{"10.2.31-MariaDB","391128431e16ac5b98831b4375ae013a", 13880, 13944, 6672, 8288, 88, 3200, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21208, 548, 516},
|
||||
//offsets for: /mariadb/10.1.44/bin/mysqld (10.1.44-MariaDB)
|
||||
{"10.1.44-MariaDB","60a119ad7a72b056f8a5ea8c57e9fef1", 13712, 13776, 6488, 8096, 88, 3032, 8, 0, 16, 24, 152, 13868, 7864, 2984, 2992, 2996, 568, 0, 0, 13088, 13112, 13096, 20672, 548, 516},
|
||||
//offsets for: /mariadb/10.1.45/bin/mysqld (10.1.45-MariaDB)
|
||||
{"10.1.45-MariaDB","45154ae9fd381e6ad2a7275cc7a96e80", 13712, 13776, 6488, 8096, 88, 3032, 8, 0, 16, 24, 152, 13868, 7864, 2984, 2992, 2996, 568, 0, 0, 13088, 13112, 13096, 20672, 548, 516},
|
||||
//offsets for: /mariadb/10.2.32/bin/mysqld (10.2.32-MariaDB)
|
||||
{"10.2.32-MariaDB","c01338f35c5564e0219c5e68ecaef0c7", 13880, 13944, 6672, 8288, 88, 3200, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21208, 548, 516},
|
||||
//offsets for: /mariadb/5.5.67/bin/mysqld (5.5.67-MariaDB)
|
||||
{"5.5.67-MariaDB","84b34923e859f70644e4cad942446990", 12032, 12096, 5800, 6904, 88, 2976, 8, 0, 16, 24, 152, 12168, 6784, 0, 0, 0, 536, 0, 0, 11888, 11912, 11896, 11960, 548, 516},
|
||||
//offsets for: /mariadb/5.5.68/bin/mysqld (5.5.68-MariaDB)
|
||||
{"5.5.68-MariaDB","85d03b4ef67225579235c6312fa4ed2b", 12032, 12096, 5800, 6904, 88, 2976, 8, 0, 16, 24, 152, 12168, 6784, 0, 0, 0, 536, 0, 0, 11888, 11912, 11896, 11960, 548, 516},
|
||||
//offsets for: /mariadb/10.1.41/bin/mysqld (10.1.41-MariaDB)
|
||||
{"10.1.41-MariaDB","3c8a4882971a3ee4671f093a0215b955", 13712, 13776, 6488, 8096, 88, 3040, 8, 0, 16, 24, 152, 13868, 7864, 2984, 2992, 2996, 568, 0, 0, 13088, 13112, 13096, 20680, 548, 516},
|
||||
//offsets for: /mariadb/10.2.26/bin/mysqld (10.2.26-MariaDB)
|
||||
{"10.2.26-MariaDB","523e563f20512468cb555ad01398872b", 13880, 13944, 6672, 8288, 88, 3208, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21216, 548, 516},
|
||||
//offsets for: /mariadb/5.5.65/bin/mysqld (5.5.65-MariaDB)
|
||||
{"5.5.65-MariaDB","f7187d236feaf618ef4522abaee22fa1", 12032, 12096, 5800, 6904, 88, 2976, 8, 0, 16, 24, 152, 12168, 6784, 0, 0, 0, 536, 0, 0, 11888, 11912, 11896, 11960, 548, 516},
|
||||
//offsets for: /mariadb/10.2.25/bin/mysqld (10.2.25-MariaDB)
|
||||
{"10.2.25-MariaDB","cb52b4ff1b8ad4ec889f820cb261af89", 13880, 13944, 6672, 8288, 88, 3200, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21200, 548, 516},
|
||||
//offsets for: /mariadb/10.1.40/bin/mysqld (10.1.40-MariaDB)
|
||||
{"10.1.40-MariaDB","f90a471397d82b15a6756788fad1eb16", 13712, 13776, 6488, 8096, 88, 3032, 8, 0, 16, 24, 152, 13868, 7864, 2984, 2992, 2996, 568, 0, 0, 13088, 13112, 13096, 20664, 548, 516},
|
||||
//offsets for: /mariadb/10.1.39/bin/mysqld (10.1.39-MariaDB)
|
||||
{"10.1.39-MariaDB","40ac6dfbdf7af2848e80e34b98671092", 13712, 13776, 6488, 8096, 88, 3032, 8, 0, 16, 24, 152, 13868, 7864, 2984, 2992, 2996, 568, 0, 0, 13088, 13112, 13096, 20664, 548, 516},
|
||||
//offsets for: /mariadb/10.2.24/bin/mysqld (10.2.24-MariaDB)
|
||||
{"10.2.24-MariaDB","55ba5d0b3c80cb6acabb286920622694", 13880, 13944, 6672, 8288, 88, 3200, 8, 0, 16, 24, 152, 14044, 8048, 2984, 2992, 2996, 608, 0, 0, 13256, 13280, 13264, 21200, 548, 516},
|
||||
//offsets for: /mariadb/10.2.23/bin/mysqld (10.2.23-MariaDB)
|
||||
{"10.2.23-MariaDB","b955b4775d8bf1ea320b1db6b30beec0", 13880, 13944, 6672, 8288, 88, 3200, 8, 0, 16, 24, 152, 14044, 8048, 3136, 3144, 3148, 608, 0, 0, 13256, 13280, 13264, 21200, 548, 516},
|
||||
//offsets for: /mariadb/5.5.64/bin/mysqld (5.5.64-MariaDB)
|
||||
{"5.5.64-MariaDB","aefa82168c5251432d5fcdce396e8694", 12032, 12096, 5800, 6904, 88, 2968, 8, 0, 16, 24, 152, 12168, 6784, 0, 0, 0, 536, 0, 0, 11888, 11912, 11896, 11960, 548, 516},
|
||||
//offsets for: /mariadb/10.2.22/bin/mysqld (10.2.22-MariaDB)
|
||||
{"10.2.22-MariaDB","ba086874b7acabc1de00ec7e8ac54079", 13864, 13928, 6656, 8272, 88, 3200, 8, 0, 16, 24, 152, 14028, 8032, 3136, 3144, 3148, 608, 0, 0, 13240, 13264, 13248, 21200, 548, 516},
|
||||
//offsets for: /mariadb/10.1.38/bin/mysqld (10.1.38-MariaDB)
|
||||
{"10.1.38-MariaDB","a46559ab540904ffffd85f9b82a91f9b", 13696, 13760, 6472, 8080, 88, 3032, 8, 0, 16, 24, 152, 13852, 7848, 3136, 3144, 3148, 568, 0, 0, 13072, 13096, 13080, 20664, 548, 516},
|
||||
//offsets for: /mariadb/10.0.38/bin/mysqld (10.0.38-MariaDB)
|
||||
{"10.0.38-MariaDB","1acff2ccca30e86854c7921bd3911095", 13480, 13544, 6256, 7864, 88, 3024, 8, 0, 16, 24, 152, 13636, 7632, 3136, 3144, 3148, 560, 0, 0, 12856, 12880, 12864, 20160, 548, 516},
|
||||
//offsets for: /mariadb/5.5.63/bin/mysqld (5.5.63-MariaDB)
|
||||
{"5.5.63-MariaDB","c66b59202aef50e99bfb1b94389e257e", 12032, 12096, 5800, 6904, 88, 2968, 8, 0, 16, 24, 152, 12168, 6784, 0, 0, 0, 536, 0, 0, 11888, 11912, 11896, 11960, 548, 516},
|
||||
//offsets for: /mariadb/10.2.21/bin/mysqld (10.2.21-MariaDB)
|
||||
{"10.2.21-MariaDB","317a5bc42a4b908a30f8a8ffc04902bf", 13856, 13920, 6656, 8264, 88, 3200, 8, 0, 16, 24, 152, 14020, 8032, 3136, 3144, 3148, 608, 0, 0, 13232, 13256, 13240, 21192, 548, 516},
|
||||
//offsets for: /mariadb/10.2.20/bin/mysqld (10.2.20-MariaDB)
|
||||
{"10.2.20-MariaDB","a125d5121f6b7c5c859e49f84739b79e", 13856, 13920, 6656, 8264, 88, 3200, 8, 0, 16, 24, 152, 14020, 8032, 3136, 3144, 3148, 608, 0, 0, 13232, 13256, 13240, 21192, 548, 516},
|
||||
//offsets for: /mariadb/10.2.19/bin/mysqld (10.2.19-MariaDB)
|
||||
{"10.2.19-MariaDB","174314a6bcd300fad2de6a570c95c90d", 13856, 13920, 6656, 8264, 88, 3200, 8, 0, 16, 24, 152, 14020, 8032, 3136, 3144, 3148, 608, 0, 0, 13232, 13256, 13240, 21192, 548, 516},
|
||||
//offsets for: /mariadb/10.1.37/bin/mysqld (10.1.37-MariaDB)
|
||||
{"10.1.37-MariaDB","59a21352fcec668e13ea0951093f587c", 13696, 13760, 6472, 8080, 88, 3032, 8, 0, 16, 24, 152, 13852, 7848, 3136, 3144, 3148, 568, 0, 0, 13072, 13096, 13080, 20664, 548, 516},
|
||||
//offsets for: /mariadb/10.0.37/bin/mysqld (10.0.37-MariaDB)
|
||||
{"10.0.37-MariaDB","380af3dcb883b28d801a364af30e64fa", 13480, 13544, 6256, 7864, 88, 3024, 8, 0, 16, 24, 152, 13636, 7632, 3136, 3144, 3148, 560, 0, 0, 12856, 12880, 12864, 20160, 548, 516},
|
||||
//offsets for: /mariadb/5.5.62/bin/mysqld (5.5.62-MariaDB)
|
||||
{"5.5.62-MariaDB","785c7d4cdd9629e12150f0ae96429076", 12032, 12096, 5800, 6904, 88, 2968, 8, 0, 16, 24, 152, 12168, 6784, 0, 0, 0, 536, 0, 0, 11888, 11912, 11896, 11960, 548, 516},
|
||||
//offsets for: /mariadb/10.2.18/bin/mysqld (10.2.18-MariaDB)
|
||||
{"10.2.18-MariaDB","ce15e11651c65ff4f99389db6ec58d48", 13856, 13920, 6656, 8264, 88, 3200, 8, 0, 16, 24, 152, 14020, 8032, 3136, 3144, 3148, 608, 0, 0, 13232, 13256, 13240, 21256, 548, 516},
|
||||
//offsets for: /mariadb/10.1.36/bin/mysqld (10.1.36-MariaDB)
|
||||
{"10.1.36-MariaDB","f0974a637a7898bdf5feff9f2e8d87c6", 13696, 13760, 6472, 8080, 88, 3032, 8, 0, 16, 24, 152, 13852, 7848, 3136, 3144, 3148, 568, 0, 0, 13072, 13096, 13080, 20728, 548, 516},
|
||||
//offsets for: /mariadb/10.2.17/bin/mysqld (10.2.17-MariaDB)
|
||||
{"10.2.17-MariaDB","bccb48353e81116a77cf974a7d714630", 13848, 13912, 6648, 8256, 88, 3192, 8, 0, 16, 24, 152, 14012, 8024, 3136, 3144, 3148, 608, 0, 0, 13224, 13248, 13232, 21240, 548, 516},
|
||||
//offsets for: /mariadb/10.1.35/bin/mysqld (10.1.35-MariaDB)
|
||||
{"10.1.35-MariaDB","9dd9d10c8293f5f93b9457e7e81d9dc1", 13696, 13760, 6472, 8080, 88, 3032, 8, 0, 16, 24, 152, 13852, 7848, 3136, 3144, 3148, 568, 0, 0, 13072, 13096, 13080, 20728, 548, 516},
|
||||
//offsets for: /mariadb/5.5.61/bin/mysqld (5.5.61-MariaDB)
|
||||
{"5.5.61-MariaDB","b86fca5dc0c25dbf931ea2759d2e8e79", 12032, 12096, 5800, 6904, 88, 2968, 8, 0, 16, 24, 152, 12168, 6784, 0, 0, 0, 536, 0, 0, 11888, 11912, 11896, 11960, 548, 516},
|
||||
//offsets for: /mariadb/10.0.36/bin/mysqld (10.0.36-MariaDB)
|
||||
{"10.0.36-MariaDB","7e564736f19e9b5b8a2ab39cf4431638", 13480, 13544, 6256, 7864, 88, 3024, 8, 0, 16, 24, 152, 13636, 7632, 3136, 3144, 3148, 560, 0, 0, 12856, 12880, 12864, 20160, 548, 516},
|
||||
//offsets for: /mariadb/10.2.16/bin/mysqld (10.2.16-MariaDB)
|
||||
{"10.2.16-MariaDB","3a37b9a3a7532013db108992eb1709d6", 13848, 13912, 6648, 8256, 88, 3192, 8, 0, 16, 24, 152, 14012, 8024, 3136, 3144, 3148, 608, 0, 0, 13224, 13248, 13232, 21240, 548, 516},
|
||||
//offsets for: /mariadb/10.1.34/bin/mysqld (10.1.34-MariaDB)
|
||||
{"10.1.34-MariaDB","6dfb8978c94cd107b550cf3557dff6a3", 13696, 13760, 6472, 8080, 88, 3032, 8, 0, 16, 24, 152, 13852, 7848, 3136, 3144, 3148, 568, 0, 0, 13072, 13096, 13080, 20728, 548, 516},
|
||||
//offsets for: /mariadb/10.2.15/bin/mysqld (10.2.15-MariaDB)
|
||||
{"10.2.15-MariaDB","c473b3f7622aff7283d320b072fb30cc", 13856, 13920, 6656, 8264, 88, 3184, 8, 0, 16, 24, 160, 14020, 8032, 3136, 3144, 3148, 616, 0, 0, 13232, 13256, 13240, 21184, 548, 516},
|
||||
//offsets for: /mariadb/10.1.33/bin/mysqld (10.1.33-MariaDB)
|
||||
{"10.1.33-MariaDB","bf18ae8c8a99b1871806953dd6649b37", 13704, 13768, 6480, 8088, 88, 3024, 8, 0, 16, 24, 160, 13860, 7856, 3136, 3144, 3148, 576, 0, 0, 13080, 13104, 13088, 20672, 548, 516},
|
||||
//offsets for: /mariadb/10.0.35/bin/mysqld (10.0.35-MariaDB)
|
||||
{"10.0.35-MariaDB","591e2729482ba287951216d1793f68ba", 13480, 13544, 6256, 7864, 88, 3024, 8, 0, 16, 24, 152, 13636, 7632, 3136, 3144, 3148, 560, 0, 0, 12856, 12880, 12864, 20160, 548, 516},
|
||||
//offsets for: /mariadb/5.5.60/bin/mysqld (5.5.60-MariaDB)
|
||||
{"5.5.60-MariaDB","facec6bef036c130a0a27a2d6b51970a", 12032, 12096, 5800, 6904, 88, 2968, 8, 0, 16, 24, 152, 12168, 6784, 0, 0, 0, 536, 0, 0, 11888, 11912, 11896, 11960, 548, 516},
|
||||
//offsets for: /mariadb/10.1.32/bin/mysqld (10.1.32-MariaDB)
|
||||
{"10.1.32-MariaDB","1e16d7fd42bf4208480c108849680dd7", 13704, 13768, 6480, 8088, 88, 3024, 8, 0, 16, 24, 160, 13860, 7856, 3136, 3144, 3148, 576, 0, 0, 13080, 13104, 13088, 20672, 548, 516},
|
||||
//offsets for: /mariadb/10.2.14/bin/mysqld (10.2.14-MariaDB)
|
||||
{"10.2.14-MariaDB","65706d173450b4e370a5a24ae6d941b3", 13856, 13920, 6656, 8264, 88, 3184, 8, 0, 16, 24, 160, 14020, 8032, 3136, 3144, 3148, 616, 0, 0, 13232, 13256, 13240, 21184, 548, 516},
|
||||
//offsets for: /mariadb/10.2.13/bin/mysqld (10.2.13-MariaDB)
|
||||
{"10.2.13-MariaDB","a00448e746480b043b06eae74aa85fc1", 13856, 13920, 6656, 8264, 88, 3184, 8, 0, 16, 24, 160, 14020, 8032, 3136, 3144, 3148, 616, 0, 0, 13232, 13256, 13240, 21184, 548, 516},
|
||||
//offsets for: /mariadb/10.1.31/bin/mysqld (10.1.31-MariaDB)
|
||||
@@ -545,6 +747,56 @@ const ThdOffsets thd_offsets_arr[] =
|
||||
const ThdOffsets thd_offsets_arr[] =
|
||||
{
|
||||
/* +++ MYSQL 32 OFFSETS GO HERE +++ */
|
||||
//offsets for: /mysqlrpm/5.6.50/usr/sbin/mysqld (5.6.50)
|
||||
{"5.6.50","faec9307821c607dbe7b4dd0e42e85fb", 4680, 4708, 2664, 3056, 36, 1748, 60, 0, 20, 64, 72, 4780, 2984, 2268, 2272, 2276, 348, 0, 0, 4208, 4232, 4216, 8664, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.32/usr/sbin/mysqld (5.7.32)
|
||||
{"5.7.32","66e823d0163d65a48c6f6643cbb0403e", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.6.49/usr/sbin/mysqld (5.6.49)
|
||||
{"5.6.49","2d3f8c93e042cf09b247b55016b3c0b3", 4680, 4708, 2664, 3056, 36, 1748, 60, 0, 20, 64, 72, 4780, 2984, 2268, 2272, 2276, 348, 0, 0, 4208, 4232, 4216, 8664, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.31/usr/sbin/mysqld (5.7.31)
|
||||
{"5.7.31","597a23bebe174f3d86d69e9616f5b668", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.6.46/usr/sbin/mysqld (5.6.46)
|
||||
{"5.6.46","908df568e2a9b70d4f952500a42b4869", 4680, 4708, 2664, 3056, 36, 1748, 60, 0, 20, 64, 72, 4780, 2984, 2268, 2272, 2276, 348, 0, 0, 4208, 4232, 4216, 8664, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.6.47/usr/sbin/mysqld (5.6.47)
|
||||
{"5.6.47","2e4b0d22423ed1628b1b3036e0265836", 4680, 4708, 2664, 3056, 36, 1748, 60, 0, 20, 64, 72, 4780, 2984, 2268, 2272, 2276, 348, 0, 0, 4208, 4232, 4216, 8664, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.6.48/usr/sbin/mysqld (5.6.48)
|
||||
{"5.6.48","b4df1419dd500b5c46d89a69fbef1ec4", 4680, 4708, 2664, 3056, 36, 1748, 60, 0, 20, 64, 72, 4780, 2984, 2268, 2272, 2276, 348, 0, 0, 4208, 4232, 4216, 8664, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.28/usr/sbin/mysqld (5.7.28)
|
||||
{"5.7.28","e0eac037982665321a51456270b73b62", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.7.29/usr/sbin/mysqld (5.7.29)
|
||||
{"5.7.29","6502a2f344054a85249b507dff890c17", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.7.30/usr/sbin/mysqld (5.7.30)
|
||||
{"5.7.30","3e1f557e58b63dba8ea5c875ecb92a47", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.6.45/usr/sbin/mysqld (5.6.45)
|
||||
{"5.6.45","a429e9854cffc5a66f8c03b98794b24d", 4680, 4708, 2664, 3056, 36, 1748, 60, 0, 20, 64, 72, 4780, 2984, 2268, 2272, 2276, 348, 0, 0, 4208, 4232, 4216, 8664, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.27/usr/sbin/mysqld (5.7.27)
|
||||
{"5.7.27","49410d4e2d72fa949669488e2e918a6a", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.6.44/usr/sbin/mysqld (5.6.44)
|
||||
{"5.6.44","e849a781256d44e55cd898cfe549722f", 4680, 4708, 2664, 3056, 36, 1748, 60, 0, 20, 64, 72, 4780, 2984, 2268, 2272, 2276, 348, 0, 0, 4208, 4232, 4216, 8664, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.26/usr/sbin/mysqld (5.7.26)
|
||||
{"5.7.26","5dd7e67055f299bf575dd836f8f5891e", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.6.43/usr/sbin/mysqld (5.6.43)
|
||||
{"5.6.43","0dbe6f81766c5deffda7fccdccded1bc", 4676, 4704, 2660, 3052, 36, 1748, 60, 0, 20, 64, 72, 4776, 2980, 2268, 2272, 2276, 348, 0, 0, 4204, 4228, 4212, 8660, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.25/usr/sbin/mysqld (5.7.25)
|
||||
{"5.7.25","6b13530de06cdddab76d7e418d50aa81", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.5.62/usr/sbin/mysqld (5.5.62)
|
||||
{"5.5.62","75e992b5b2ea93ad5ce3f1cc02bc25be", 3872, 3900, 2368, 2748, 44, 1656, 60, 0, 20, 64, 60, 3956, 2680, 0, 0, 0, 328, 0, 0, 3780, 3804, 3788, 3832, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.6.42/usr/sbin/mysqld (5.6.42)
|
||||
{"5.6.42","0dbbf35b97cd62636dc4d60db56163d0", 4676, 4704, 2660, 3052, 36, 1748, 60, 0, 20, 64, 72, 4776, 2980, 2268, 2272, 2276, 348, 0, 0, 4204, 4228, 4212, 8660, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.24/usr/sbin/mysqld (5.7.24)
|
||||
{"5.7.24","d4e3e06ab31c02feba215b6a5d49f955", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.6.41/usr/sbin/mysqld (5.6.41)
|
||||
{"5.6.41","5cc404fe283e2dc0cf7877cdd7a36f98", 4676, 4704, 2660, 3052, 36, 1748, 60, 0, 20, 64, 72, 4776, 2980, 2268, 2272, 2276, 348, 0, 0, 4204, 4228, 4212, 8660, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.23/usr/sbin/mysqld (5.7.23)
|
||||
{"5.7.23","74d9d243e18e124cbc106b814f7349af", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.5.61/usr/sbin/mysqld (5.5.61)
|
||||
{"5.5.61","a744dda3ef8ac3d7971cdaae7a3a8b55", 3872, 3900, 2368, 2748, 44, 1656, 60, 0, 20, 64, 60, 3956, 2680, 0, 0, 0, 328, 0, 0, 3780, 3804, 3788, 3832, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.5.60/usr/sbin/mysqld (5.5.60)
|
||||
{"5.5.60","b6e0bde2bed4b49c3e57aa044eba5d8d", 3872, 3900, 2368, 2748, 44, 1656, 60, 0, 20, 64, 60, 3956, 2680, 0, 0, 0, 328, 0, 0, 3780, 3804, 3788, 3832, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.6.40/usr/sbin/mysqld (5.6.40)
|
||||
{"5.6.40","914aae4fc081ff60533c45ad7c232655", 4676, 4704, 2660, 3052, 36, 1748, 60, 0, 20, 64, 72, 4776, 2980, 2268, 2272, 2276, 348, 0, 0, 4204, 4228, 4212, 8660, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.7.22/usr/sbin/mysqld (5.7.22)
|
||||
{"5.7.22","907ffc0dc445563dc1c5d91e2401881d", 5084, 5112, 2212, 3036, 296, 200, 0, 20, 40, 100, 340, 5196, 2776, 3108, 3112, 3116, 3720, 1152, 4, 4536, 4572, 4556, 9044, 80, 604},
|
||||
//offsets for: /mysqlrpm/5.5.59/usr/sbin/mysqld (5.5.59)
|
||||
{"5.5.59","b2f39b9dd5acd3609b4e06af561d9174", 3872, 3900, 2368, 2748, 44, 1656, 60, 0, 20, 64, 60, 3956, 2680, 0, 0, 0, 328, 0, 0, 3780, 3804, 3788, 3832, 548, 516},
|
||||
//offsets for: /mysqlrpm/5.6.39/usr/sbin/mysqld (5.6.39)
|
||||
@@ -810,6 +1062,108 @@ const ThdOffsets thd_offsets_arr[] =
|
||||
const ThdOffsets thd_offsets_arr[] =
|
||||
{
|
||||
/* +++ MARIADB 32 OFFSETS GO HERE +++ */
|
||||
//offsets for: /mariadb/10.2.36/bin/mysqld (10.2.36-MariaDB)
|
||||
{"10.2.36-MariaDB","2360c1f90821d784efc03cc21d97bd97", 8616, 8652, 3964, 5432, 44, 2032, 4, 0, 8, 12, 84, 8736, 5292, 2604, 2608, 2612, 376, 0, 0, 8140, 8164, 8148, 13468, 548, 516},
|
||||
//offsets for: /mariadb/10.2.35/bin/mysqld (10.2.35-MariaDB)
|
||||
{"10.2.35-MariaDB","7863a7625cee0be06d559fbd80786acb", 8616, 8652, 3964, 5432, 44, 2032, 4, 0, 8, 12, 84, 8736, 5292, 2604, 2608, 2612, 376, 0, 0, 8140, 8164, 8148, 13468, 548, 516},
|
||||
//offsets for: /mariadb/10.1.48/bin/mysqld (10.1.48-MariaDB)
|
||||
{"10.1.48-MariaDB","f316467dfccea26c7afc34c535e546ef", 8516, 8552, 3860, 5320, 44, 1928, 4, 0, 8, 12, 84, 8624, 5188, 2604, 2608, 2612, 356, 0, 0, 8040, 8064, 8048, 13152, 548, 516},
|
||||
//offsets for: /mariadb/10.1.43/bin/mysqld (10.1.43-MariaDB)
|
||||
{"10.1.43-MariaDB","e0e44c5fa79d68f4266ca97ece05e764", 8540, 8576, 3884, 5344, 44, 1932, 4, 0, 8, 12, 84, 8648, 5212, 2604, 2608, 2612, 356, 0, 0, 8064, 8088, 8072, 13180, 548, 516},
|
||||
//offsets for: /mariadb/10.2.27/bin/mysqld (10.2.27-MariaDB)
|
||||
{"10.2.27-MariaDB","b5e02d52fe8a803add2c05bc846c9cff", 8640, 8676, 3988, 5456, 44, 2032, 4, 0, 8, 12, 84, 8760, 5316, 2604, 2608, 2612, 376, 0, 0, 8164, 8188, 8172, 13488, 548, 516},
|
||||
//offsets for: /mariadb/10.2.29/bin/mysqld (10.2.29-MariaDB)
|
||||
{"10.2.29-MariaDB","9a6d57a5c420f8357e3d3dd4823b0756", 8640, 8676, 3988, 5456, 44, 2032, 4, 0, 8, 12, 84, 8760, 5316, 2604, 2608, 2612, 376, 0, 0, 8164, 8188, 8172, 13488, 548, 516},
|
||||
//offsets for: /mariadb/5.5.66/bin/mysqld (5.5.66-MariaDB)
|
||||
{"5.5.66-MariaDB","fd2c0a1cd70e42a45e76307a6cfb6ad3", 7276, 7312, 3460, 4468, 44, 1884, 4, 0, 8, 12, 84, 7372, 4400, 0, 0, 0, 340, 0, 0, 7176, 7200, 7184, 7236, 548, 516},
|
||||
//offsets for: /mariadb/10.1.47/bin/mysqld (10.1.47-MariaDB)
|
||||
{"10.1.47-MariaDB","1875f21a9783cb50bb9214e1ba15bad4", 8516, 8552, 3860, 5320, 44, 1928, 4, 0, 8, 12, 84, 8624, 5188, 2604, 2608, 2612, 356, 0, 0, 8040, 8064, 8048, 13152, 548, 516},
|
||||
//offsets for: /mariadb/10.2.34/bin/mysqld (10.2.34-MariaDB)
|
||||
{"10.2.34-MariaDB","229474e5966945b70e0f795ceb37d4be", 8616, 8652, 3964, 5432, 44, 2032, 4, 0, 8, 12, 84, 8736, 5292, 2604, 2608, 2612, 376, 0, 0, 8140, 8164, 8148, 13468, 548, 516},
|
||||
//offsets for: /mariadb/10.2.30/bin/mysqld (10.2.30-MariaDB)
|
||||
{"10.2.30-MariaDB","c8fdfa05e5262a42f630b879cb0208f7", 8640, 8676, 3988, 5456, 44, 2032, 4, 0, 8, 12, 84, 8760, 5316, 2604, 2608, 2612, 376, 0, 0, 8164, 8188, 8172, 13488, 548, 516},
|
||||
//offsets for: /mariadb/10.2.33/bin/mysqld (10.2.33-MariaDB)
|
||||
{"10.2.33-MariaDB","09da575acaea44eb61ecb03900d370ec", 8616, 8652, 3964, 5432, 44, 2032, 4, 0, 8, 12, 84, 8736, 5292, 2604, 2608, 2612, 376, 0, 0, 8140, 8164, 8148, 13468, 548, 516},
|
||||
//offsets for: /mariadb/10.1.46/bin/mysqld (10.1.46-MariaDB)
|
||||
{"10.1.46-MariaDB","6ea657fe50fa68eff407912d75a39120", 8516, 8552, 3860, 5320, 44, 1928, 4, 0, 8, 12, 84, 8624, 5188, 2604, 2608, 2612, 356, 0, 0, 8040, 8064, 8048, 13152, 548, 516},
|
||||
//offsets for: /mariadb/10.2.32/bin/mysqld (10.2.32-MariaDB)
|
||||
{"10.2.32-MariaDB","9cbcd8dfa5590ab8db7bf55f6f31f992", 8616, 8652, 3964, 5432, 44, 2028, 4, 0, 8, 12, 84, 8736, 5292, 2604, 2608, 2612, 376, 0, 0, 8140, 8164, 8148, 13460, 548, 516},
|
||||
//offsets for: /mariadb/10.1.44/bin/mysqld (10.1.44-MariaDB)
|
||||
{"10.1.44-MariaDB","b5542ac9eafee566d86896be802293eb", 8540, 8576, 3884, 5344, 44, 1928, 4, 0, 8, 12, 84, 8648, 5212, 2604, 2608, 2612, 356, 0, 0, 8064, 8088, 8072, 13176, 548, 516},
|
||||
//offsets for: /mariadb/10.1.45/bin/mysqld (10.1.45-MariaDB)
|
||||
{"10.1.45-MariaDB","891616e964a5ff3957022519d6496909", 8516, 8552, 3860, 5320, 44, 1928, 4, 0, 8, 12, 84, 8624, 5188, 2604, 2608, 2612, 356, 0, 0, 8040, 8064, 8048, 13152, 548, 516},
|
||||
//offsets for: /mariadb/10.2.31/bin/mysqld (10.2.31-MariaDB)
|
||||
{"10.2.31-MariaDB","6ffdbfb680448d85803149d8ba5d087a", 8640, 8676, 3988, 5456, 44, 2028, 4, 0, 8, 12, 84, 8760, 5316, 2604, 2608, 2612, 376, 0, 0, 8164, 8188, 8172, 13484, 548, 516},
|
||||
//offsets for: /mariadb/5.5.67/bin/mysqld (5.5.67-MariaDB)
|
||||
{"5.5.67-MariaDB","7b1a93e0e54c84dce4763862199980cb", 7276, 7312, 3460, 4468, 44, 1884, 4, 0, 8, 12, 84, 7372, 4400, 0, 0, 0, 340, 0, 0, 7176, 7200, 7184, 7236, 548, 516},
|
||||
//offsets for: /mariadb/5.5.68/bin/mysqld (5.5.68-MariaDB)
|
||||
{"5.5.68-MariaDB","042bec4b00532423dd46da4ff5ce7e9e", 7276, 7312, 3460, 4468, 44, 1884, 4, 0, 8, 12, 84, 7372, 4400, 0, 0, 0, 340, 0, 0, 7176, 7200, 7184, 7236, 548, 516},
|
||||
//offsets for: /mariadb/10.1.41/bin/mysqld (10.1.41-MariaDB)
|
||||
{"10.1.41-MariaDB","eb3a635b47ffd30f3a975bd678d21545", 8540, 8576, 3884, 5344, 44, 1932, 4, 0, 8, 12, 84, 8648, 5212, 2604, 2608, 2612, 356, 0, 0, 8064, 8088, 8072, 13180, 548, 516},
|
||||
//offsets for: /mariadb/10.2.26/bin/mysqld (10.2.26-MariaDB)
|
||||
{"10.2.26-MariaDB","7335b29f0539c2f51da78f6665ae3ed8", 8640, 8676, 3988, 5456, 44, 2032, 4, 0, 8, 12, 84, 8760, 5316, 2604, 2608, 2612, 376, 0, 0, 8164, 8188, 8172, 13488, 548, 516},
|
||||
//offsets for: /mariadb/5.5.65/bin/mysqld (5.5.65-MariaDB)
|
||||
{"5.5.65-MariaDB","af42f2c2c37a62b31c8ffab002a3c215", 7276, 7312, 3460, 4468, 44, 1884, 4, 0, 8, 12, 84, 7372, 4400, 0, 0, 0, 340, 0, 0, 7176, 7200, 7184, 7236, 548, 516},
|
||||
//offsets for: /mariadb/10.2.25/bin/mysqld (10.2.25-MariaDB)
|
||||
{"10.2.25-MariaDB","fc3aa9473db8ce277daa94a9b2ea4cb9", 8640, 8676, 3988, 5456, 44, 2028, 4, 0, 8, 12, 84, 8760, 5316, 2604, 2608, 2612, 376, 0, 0, 8164, 8188, 8172, 13480, 548, 516},
|
||||
//offsets for: /mariadb/10.1.40/bin/mysqld (10.1.40-MariaDB)
|
||||
{"10.1.40-MariaDB","1d75d817dd5c588765024ffa5ed0fb15", 8540, 8576, 3884, 5344, 44, 1928, 4, 0, 8, 12, 84, 8648, 5212, 2604, 2608, 2612, 356, 0, 0, 8064, 8088, 8072, 13172, 548, 516},
|
||||
//offsets for: /mariadb/10.1.39/bin/mysqld (10.1.39-MariaDB)
|
||||
{"10.1.39-MariaDB","b092e8bb10ab3e3f03e9dad79cd765e0", 8540, 8576, 3884, 5344, 44, 1928, 4, 0, 8, 12, 84, 8648, 5212, 2604, 2608, 2612, 356, 0, 0, 8064, 8088, 8072, 13172, 548, 516},
|
||||
//offsets for: /mariadb/10.2.24/bin/mysqld (10.2.24-MariaDB)
|
||||
{"10.2.24-MariaDB","d453d1882851ae30242639ae81ab2185", 8640, 8676, 3988, 5456, 44, 2028, 4, 0, 8, 12, 84, 8760, 5316, 2604, 2608, 2612, 376, 0, 0, 8164, 8188, 8172, 13480, 548, 516},
|
||||
//offsets for: /mariadb/10.2.23/bin/mysqld (10.2.23-MariaDB)
|
||||
{"10.2.23-MariaDB","74b14e0fa8520f3143154f73ceb84c0c", 8640, 8676, 3988, 5456, 44, 2028, 4, 0, 8, 12, 84, 8760, 5316, 2604, 2608, 2612, 376, 0, 0, 8164, 8188, 8172, 13480, 548, 516},
|
||||
//offsets for: /mariadb/5.5.64/bin/mysqld (5.5.64-MariaDB)
|
||||
{"5.5.64-MariaDB","3dba0232419ef10c1f342a40687f3de0", 7276, 7312, 3460, 4468, 44, 1880, 4, 0, 8, 12, 84, 7372, 4400, 0, 0, 0, 340, 0, 0, 7176, 7200, 7184, 7236, 548, 516},
|
||||
//offsets for: /mariadb/10.2.22/bin/mysqld (10.2.22-MariaDB)
|
||||
{"10.2.22-MariaDB","97cdec65b3a1f4a9e83f4c8b6b74167a", 8632, 8668, 3980, 5448, 44, 2028, 4, 0, 8, 12, 84, 8752, 5308, 2604, 2608, 2612, 376, 0, 0, 8156, 8180, 8164, 13480, 548, 516},
|
||||
//offsets for: /mariadb/10.1.38/bin/mysqld (10.1.38-MariaDB)
|
||||
{"10.1.38-MariaDB","f83032ba5680816cd9a82c93f0c7cd75", 8532, 8568, 3876, 5336, 44, 1928, 4, 0, 8, 12, 84, 8640, 5204, 2604, 2608, 2612, 356, 0, 0, 8056, 8080, 8064, 13172, 548, 516},
|
||||
//offsets for: /mariadb/10.0.38/bin/mysqld (10.0.38-MariaDB)
|
||||
{"10.0.38-MariaDB","608c21bd63090fd1b83fb77dafb3ac5b", 8368, 8404, 3712, 5172, 44, 1924, 4, 0, 8, 12, 84, 8476, 5040, 2604, 2608, 2612, 352, 0, 0, 7892, 7916, 7900, 12784, 548, 516},
|
||||
//offsets for: /mariadb/5.5.63/bin/mysqld (5.5.63-MariaDB)
|
||||
{"5.5.63-MariaDB","54ffd77df2298407b3747d786a710ef6", 7276, 7312, 3460, 4468, 44, 1880, 4, 0, 8, 12, 84, 7372, 4400, 0, 0, 0, 340, 0, 0, 7176, 7200, 7184, 7236, 548, 516},
|
||||
//offsets for: /mariadb/10.2.21/bin/mysqld (10.2.21-MariaDB)
|
||||
{"10.2.21-MariaDB","be82a184b86e9a679536c254763508ae", 8628, 8664, 3980, 5444, 44, 2024, 4, 0, 8, 12, 84, 8748, 5308, 2604, 2608, 2612, 376, 0, 0, 8152, 8176, 8160, 13472, 548, 516},
|
||||
//offsets for: /mariadb/10.2.20/bin/mysqld (10.2.20-MariaDB)
|
||||
{"10.2.20-MariaDB","1228afa7af46aba045a02db9c77c2772", 8628, 8664, 3980, 5444, 44, 2024, 4, 0, 8, 12, 84, 8748, 5308, 2604, 2608, 2612, 376, 0, 0, 8152, 8176, 8160, 13472, 548, 516},
|
||||
//offsets for: /mariadb/10.2.19/bin/mysqld (10.2.19-MariaDB)
|
||||
{"10.2.19-MariaDB","83667c63ff440025cf188325d4b2b904", 8628, 8664, 3980, 5444, 44, 2024, 4, 0, 8, 12, 84, 8748, 5308, 2604, 2608, 2612, 376, 0, 0, 8152, 8176, 8160, 13472, 548, 516},
|
||||
//offsets for: /mariadb/10.1.37/bin/mysqld (10.1.37-MariaDB)
|
||||
{"10.1.37-MariaDB","c2c9ae320dcb00f4c82ecb22b79b3b61", 8532, 8568, 3876, 5336, 44, 1924, 4, 0, 8, 12, 84, 8640, 5204, 2604, 2608, 2612, 356, 0, 0, 8056, 8080, 8064, 13168, 548, 516},
|
||||
//offsets for: /mariadb/10.0.37/bin/mysqld (10.0.37-MariaDB)
|
||||
{"10.0.37-MariaDB","83a278e8c8ce84512358385b5f972411", 8368, 8404, 3712, 5172, 44, 1920, 4, 0, 8, 12, 84, 8476, 5040, 2604, 2608, 2612, 352, 0, 0, 7892, 7916, 7900, 12780, 548, 516},
|
||||
//offsets for: /mariadb/5.5.62/bin/mysqld (5.5.62-MariaDB)
|
||||
{"5.5.62-MariaDB","165c523012f6f3b33a15b7b1875f11cc", 7276, 7312, 3460, 4468, 44, 1880, 4, 0, 8, 12, 84, 7372, 4400, 0, 0, 0, 340, 0, 0, 7176, 7200, 7184, 7236, 548, 516},
|
||||
//offsets for: /mariadb/10.2.18/bin/mysqld (10.2.18-MariaDB)
|
||||
{"10.2.18-MariaDB","50daa85b83637170454f13d4a50aca83", 8628, 8664, 3980, 5444, 44, 2024, 4, 0, 8, 12, 84, 8748, 5308, 2604, 2608, 2612, 376, 0, 0, 8152, 8176, 8160, 13472, 548, 516},
|
||||
//offsets for: /mariadb/10.1.36/bin/mysqld (10.1.36-MariaDB)
|
||||
{"10.1.36-MariaDB","11aff4e9c6d686efbdc367f3d1685b01", 8532, 8568, 3876, 5336, 44, 1924, 4, 0, 8, 12, 84, 8640, 5204, 2604, 2608, 2612, 356, 0, 0, 8056, 8080, 8064, 13168, 548, 516},
|
||||
//offsets for: /mariadb/10.2.17/bin/mysqld (10.2.17-MariaDB)
|
||||
{"10.2.17-MariaDB","c645011b0438fa2b88cdab2c4b910821", 8624, 8660, 3976, 5440, 44, 2020, 4, 0, 8, 12, 84, 8744, 5304, 2604, 2608, 2612, 376, 0, 0, 8148, 8172, 8156, 13464, 548, 516},
|
||||
//offsets for: /mariadb/10.1.35/bin/mysqld (10.1.35-MariaDB)
|
||||
{"10.1.35-MariaDB","7afc9cc3cf6238aa92b4bc4f29ecf16c", 8532, 8568, 3876, 5336, 44, 1924, 4, 0, 8, 12, 84, 8640, 5204, 2604, 2608, 2612, 356, 0, 0, 8056, 8080, 8064, 13168, 548, 516},
|
||||
//offsets for: /mariadb/5.5.61/bin/mysqld (5.5.61-MariaDB)
|
||||
{"5.5.61-MariaDB","5f7e28b27a823111fb5fbe047c20f1ce", 7276, 7312, 3460, 4468, 44, 1880, 4, 0, 8, 12, 84, 7372, 4400, 0, 0, 0, 340, 0, 0, 7176, 7200, 7184, 7236, 548, 516},
|
||||
//offsets for: /mariadb/10.0.36/bin/mysqld (10.0.36-MariaDB)
|
||||
{"10.0.36-MariaDB","77795500534e949f78b5eb0069b26a1c", 8368, 8404, 3712, 5172, 44, 1920, 4, 0, 8, 12, 84, 8476, 5040, 2604, 2608, 2612, 352, 0, 0, 7892, 7916, 7900, 12780, 548, 516},
|
||||
//offsets for: /mariadb/10.2.16/bin/mysqld (10.2.16-MariaDB)
|
||||
{"10.2.16-MariaDB","bf394e213274c76dfbd2fd66b1238b3f", 8624, 8660, 3976, 5440, 44, 2020, 4, 0, 8, 12, 84, 8744, 5304, 2604, 2608, 2612, 376, 0, 0, 8148, 8172, 8156, 13464, 548, 516},
|
||||
//offsets for: /mariadb/10.1.34/bin/mysqld (10.1.34-MariaDB)
|
||||
{"10.1.34-MariaDB","efa9e9713f9856d0496471d20964bdcc", 8532, 8568, 3876, 5336, 44, 1924, 4, 0, 8, 12, 84, 8640, 5204, 2604, 2608, 2612, 356, 0, 0, 8056, 8080, 8064, 13168, 548, 516},
|
||||
//offsets for: /mariadb/10.2.15/bin/mysqld (10.2.15-MariaDB)
|
||||
{"10.2.15-MariaDB","4782e7a5f3f54eeb32f7bc8bbc28a5ff", 8628, 8664, 3980, 5444, 44, 2016, 4, 0, 8, 12, 88, 8748, 5308, 2604, 2608, 2612, 380, 0, 0, 8152, 8176, 8160, 13412, 548, 516},
|
||||
//offsets for: /mariadb/10.1.33/bin/mysqld (10.1.33-MariaDB)
|
||||
{"10.1.33-MariaDB","39f7ac0f23df51cdd01b74503b09d49d", 8536, 8572, 3880, 5340, 44, 1920, 4, 0, 8, 12, 88, 8644, 5208, 2604, 2608, 2612, 360, 0, 0, 8060, 8084, 8068, 13116, 548, 516},
|
||||
//offsets for: /mariadb/10.0.35/bin/mysqld (10.0.35-MariaDB)
|
||||
{"10.0.35-MariaDB","2af9f2d8b0fab7d9eb2823df68a4b86e", 8368, 8404, 3712, 5172, 44, 1920, 4, 0, 8, 12, 84, 8476, 5040, 2604, 2608, 2612, 352, 0, 0, 7892, 7916, 7900, 12780, 548, 516},
|
||||
//offsets for: /mariadb/5.5.60/bin/mysqld (5.5.60-MariaDB)
|
||||
{"5.5.60-MariaDB","dc5dc186cab6c6865b84a848dd335c0f", 7276, 7312, 3460, 4468, 44, 1880, 4, 0, 8, 12, 84, 7372, 4400, 0, 0, 0, 340, 0, 0, 7176, 7200, 7184, 7236, 548, 516},
|
||||
//offsets for: /mariadb/10.1.32/bin/mysqld (10.1.32-MariaDB)
|
||||
{"10.1.32-MariaDB","d0c79126b04fe880649c46648f2c980f", 8536, 8572, 3880, 5340, 44, 1920, 4, 0, 8, 12, 88, 8644, 5208, 2604, 2608, 2612, 360, 0, 0, 8060, 8084, 8068, 13116, 548, 516},
|
||||
//offsets for: /mariadb/10.2.14/bin/mysqld (10.2.14-MariaDB)
|
||||
{"10.2.14-MariaDB","91fb45537f08719a5221edcf516e18b2", 8628, 8664, 3980, 5444, 44, 2012, 4, 0, 8, 12, 88, 8748, 5308, 2604, 2608, 2612, 380, 0, 0, 8152, 8176, 8160, 13408, 548, 516},
|
||||
//offsets for: /mariadb/10.2.13/bin/mysqld (10.2.13-MariaDB)
|
||||
{"10.2.13-MariaDB","e2e69f8c6cd3f1c576c6073464f3eb0d", 8628, 8664, 3980, 5444, 44, 2012, 4, 0, 8, 12, 88, 8748, 5308, 2604, 2608, 2612, 380, 0, 0, 8152, 8176, 8160, 13408, 548, 516},
|
||||
//offsets for: /mariadb/10.1.31/bin/mysqld (10.1.31-MariaDB)
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#include "mysql_inc.h"
|
||||
#include "hot_patch.h"
|
||||
#include <stdlib.h>
|
||||
@@ -47,14 +46,14 @@ static Audit_socket_handler json_socket_handler;
|
||||
static Audit_json_formatter json_formatter;
|
||||
|
||||
// flags to hold if audit handlers are enabled
|
||||
static my_bool json_file_handler_enable = FALSE;
|
||||
static my_bool force_record_logins_enable = FALSE;
|
||||
static my_bool json_file_handler_flush = FALSE;
|
||||
static my_bool json_socket_handler_enable = FALSE;
|
||||
static my_bool uninstall_plugin_enable = FALSE;
|
||||
static my_bool validate_checksum_enable = FALSE;
|
||||
static my_bool offsets_by_version_enable = FALSE;
|
||||
static my_bool validate_offsets_extended_enable = FALSE;
|
||||
static my_bool json_file_handler_enable;
|
||||
static my_bool force_record_logins_enable;
|
||||
static my_bool json_file_handler_flush;
|
||||
static my_bool json_socket_handler_enable;
|
||||
static my_bool uninstall_plugin_enable;
|
||||
static my_bool validate_checksum_enable;
|
||||
static my_bool offsets_by_version_enable;
|
||||
static my_bool validate_offsets_extended_enable;
|
||||
static char *offsets_string = NULL;
|
||||
static char *checksum_string = NULL;
|
||||
static int delay_ms_val = 0;
|
||||
@@ -129,12 +128,15 @@ static char json_socket_name_buff[1024] = {0};
|
||||
*/
|
||||
static int (*trampoline_mysql_execute_command)(THD *thd) = NULL;
|
||||
static unsigned int trampoline_mysql_execute_size = 0;
|
||||
SavedCode trampoline_mysql_execute_saved_code;
|
||||
|
||||
#if MYSQL_VERSION_ID < 50600
|
||||
static void (*trampoline_log_slow_statement)(THD *thd) = NULL;
|
||||
static unsigned int trampoline_log_slow_statement_size = 0;
|
||||
SavedCode trampoline_log_slow_statement_saved_code;
|
||||
static bool (*trampoline_acl_authenticate)(THD *thd, uint connect_errors, uint com_change_user_pkt_len) = NULL;
|
||||
static unsigned int trampoline_acl_authenticate_size = 0;
|
||||
SavedCode trampoline_acl_authenticate_saved_code;
|
||||
#endif
|
||||
|
||||
static MYSQL_THDVAR_ULONG(is_thd_printed_list,
|
||||
@@ -245,7 +247,7 @@ static void initializePeerCredentials(THD *pThd)
|
||||
peer = (PeerInfo *) THDVAR(pThd, peer_info);
|
||||
if (peer != NULL)
|
||||
{
|
||||
memset(peer, 0, sizeof(PeerInfo));
|
||||
*peer = PeerInfo();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -365,10 +367,10 @@ static void initializePeerCredentials(THD *pThd)
|
||||
}
|
||||
|
||||
// set that we have a UDS, so that THD vars will be used
|
||||
THDVAR(pThd, peer_is_uds) = TRUE;
|
||||
THDVAR(pThd, peer_is_uds) = true;
|
||||
|
||||
done:
|
||||
THDVAR(pThd, set_peer_cred) = TRUE;
|
||||
THDVAR(pThd, set_peer_cred) = true;
|
||||
}
|
||||
|
||||
PeerInfo *retrieve_peerinfo(THD *thd)
|
||||
@@ -575,11 +577,15 @@ static void audit(ThdSesData *pThdData)
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 50709
|
||||
static int (*trampoline_send_result_to_client)(Query_cache *pthis, THD *thd, char *sql, uint query_length) = NULL;
|
||||
#else
|
||||
#elif MYSQL_VERSION_ID < 80000
|
||||
static int (*trampoline_send_result_to_client)(Query_cache *pthis, THD *thd, const LEX_CSTRING& sql_query) = NULL;
|
||||
#endif
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100108
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID == 100224
|
||||
static bool (*trampoline_open_tables)(THD *thd, const DDL_options_st &options, TABLE_LIST **start, uint *counter,
|
||||
Sroutine_hash_entry **sroutine_to_open, uint flags, Prelocking_strategy *prelocking_strategy) = NULL;
|
||||
#elif defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100108
|
||||
static bool (*trampoline_open_tables)(THD *thd, const DDL_options_st &options, TABLE_LIST **start, uint *counter, uint flags,
|
||||
Prelocking_strategy *prelocking_strategy) = NULL;
|
||||
#elif MYSQL_VERSION_ID > 50505
|
||||
@@ -590,10 +596,12 @@ static int (*trampoline_open_tables)(THD *thd, TABLE_LIST **start, uint *counter
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
QueryTableInf *Audit_formatter::getQueryCacheTableList1(THD *thd)
|
||||
{
|
||||
return (QueryTableInf*) THDVAR(thd, query_cache_table_list);
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool (*trampoline_check_table_access)(THD *thd, ulong want_access,TABLE_LIST *tables,
|
||||
bool any_combination_of_privileges_will_do,
|
||||
@@ -635,7 +643,9 @@ static bool audit_check_table_access(THD *thd, ulong want_access,TABLE_LIST *tab
|
||||
}
|
||||
|
||||
static unsigned int trampoline_check_table_access_size = 0;
|
||||
SavedCode trampoline_check_table_access_saved_code;
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 50709
|
||||
static int audit_send_result_to_client(Query_cache *pthis, THD *thd, char *sql, uint query_length)
|
||||
#else
|
||||
@@ -667,8 +677,16 @@ static int audit_send_result_to_client(Query_cache *pthis, THD *thd, const LEX_
|
||||
}
|
||||
|
||||
static unsigned int trampoline_send_result_to_client_size = 0;
|
||||
SavedCode trampoline_send_result_to_client_saved_code;
|
||||
#endif // defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100108
|
||||
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID == 100224
|
||||
static bool audit_open_tables(THD *thd, const DDL_options_st &options, TABLE_LIST **start, uint *counter,
|
||||
Sroutine_hash_entry **sroutine_to_open, uint flags, Prelocking_strategy *prelocking_strategy)
|
||||
{
|
||||
bool res;
|
||||
res = trampoline_open_tables (thd, options, start, counter, sroutine_to_open, flags, prelocking_strategy);
|
||||
#elif defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100108
|
||||
static bool audit_open_tables(THD *thd, const DDL_options_st &options, TABLE_LIST **start, uint *counter, uint flags,
|
||||
Prelocking_strategy *prelocking_strategy)
|
||||
{
|
||||
@@ -699,6 +717,7 @@ static int audit_open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint f
|
||||
}
|
||||
|
||||
static unsigned int trampoline_open_tables_size = 0;
|
||||
SavedCode trampoline_open_tables_saved_code;
|
||||
|
||||
// called by log_slow_statement and general audit event caught by audit interface
|
||||
static void audit_post_execute(THD * thd)
|
||||
@@ -833,13 +852,16 @@ static struct st_mysql_audit audit_plugin =
|
||||
#endif
|
||||
|
||||
// some extern definitions which are not in include files
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
extern void log_slow_statement(THD *thd);
|
||||
#endif
|
||||
extern int mysql_execute_command(THD *thd);
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION)
|
||||
extern void end_connection(THD *thd);
|
||||
static int (*trampoline_end_connection)(THD *thd) = NULL;
|
||||
static unsigned int trampoline_end_connection_size = 0;
|
||||
SavedCode trampoline_end_connection_saved_code;
|
||||
#endif
|
||||
|
||||
void remove_hot_functions()
|
||||
@@ -849,15 +871,21 @@ void remove_hot_functions()
|
||||
#if MYSQL_VERSION_ID < 50600
|
||||
target_function = (void *) log_slow_statement;
|
||||
remove_hot_patch_function(target_function,
|
||||
(void*) trampoline_log_slow_statement, trampoline_log_slow_statement_size, true);
|
||||
(void*) trampoline_log_slow_statement, trampoline_log_slow_statement_size, true, &trampoline_log_slow_statement_saved_code);
|
||||
trampoline_log_slow_statement_size = 0;
|
||||
trampoline_log_slow_statement_saved_code.size = 0;
|
||||
target_function = (void *) acl_authenticate;
|
||||
remove_hot_patch_function(target_function,
|
||||
(void*) trampoline_acl_authenticate, trampoline_acl_authenticate_size, true);
|
||||
(void*) trampoline_acl_authenticate, trampoline_acl_authenticate_size, true, &trampoline_acl_authenticate_saved_code);
|
||||
trampoline_acl_authenticate_size = 0;
|
||||
trampoline_acl_authenticate_saved_code.size = 0;
|
||||
#endif
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100108
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID == 100224
|
||||
target_function = (void *)*(bool (*)(THD *thd, const DDL_options_st &options, TABLE_LIST **start, uint *counter,
|
||||
Sroutine_hash_entry **sroutine_to_open, uint flags, Prelocking_strategy *prelocking_strategy)) &open_tables;
|
||||
#elif defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100108
|
||||
target_function = (void *)*(bool (*)(THD *thd, const DDL_options_st &options, TABLE_LIST **start, uint *counter, uint flags,
|
||||
Prelocking_strategy *prelocking_strategy)) &open_tables;
|
||||
#elif MYSQL_VERSION_ID > 50505
|
||||
@@ -867,9 +895,11 @@ void remove_hot_functions()
|
||||
target_function = (void *)*(int (*)(THD *thd, TABLE_LIST **start, uint *counter, uint flags)) &open_tables;
|
||||
#endif
|
||||
remove_hot_patch_function(target_function,
|
||||
(void*) trampoline_open_tables, trampoline_open_tables_size, true);
|
||||
(void*) trampoline_open_tables, trampoline_open_tables_size, true, &trampoline_open_tables_saved_code);
|
||||
trampoline_open_tables_size = 0;
|
||||
trampoline_open_tables_saved_code.size = 0;
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 50709
|
||||
int (Query_cache::*pf_send_result_to_client)(THD *,char *, uint) = &Query_cache::send_result_to_client;
|
||||
#else
|
||||
@@ -877,13 +907,16 @@ void remove_hot_functions()
|
||||
#endif
|
||||
target_function = *(void **) &pf_send_result_to_client;
|
||||
remove_hot_patch_function(target_function,
|
||||
(void*) trampoline_send_result_to_client, trampoline_send_result_to_client_size, true);
|
||||
(void*) trampoline_send_result_to_client, trampoline_send_result_to_client_size, true, &trampoline_send_result_to_client_saved_code);
|
||||
trampoline_send_result_to_client_size = 0;
|
||||
trampoline_send_result_to_client_saved_code.size = 0;
|
||||
#endif
|
||||
|
||||
remove_hot_patch_function((void*) check_table_access,
|
||||
(void*) trampoline_check_table_access,
|
||||
trampoline_check_table_access_size, true);
|
||||
trampoline_check_table_access_size, true, &trampoline_check_table_access_saved_code);
|
||||
trampoline_check_table_access_size=0;
|
||||
trampoline_check_table_access_saved_code.size = 0;
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 50709
|
||||
target_function = (void*) mysql_execute_command;
|
||||
@@ -896,14 +929,16 @@ void remove_hot_functions()
|
||||
target_function = (void*) end_connection;
|
||||
remove_hot_patch_function(target_function,
|
||||
(void*) trampoline_end_connection,
|
||||
trampoline_end_connection_size, true);
|
||||
trampoline_end_connection_size, true, &trampoline_end_connection_saved_code);
|
||||
trampoline_end_connection_size = 0;
|
||||
trampoline_end_connection_saved_code.size = 0;
|
||||
#endif
|
||||
|
||||
remove_hot_patch_function(target_function,
|
||||
(void*) trampoline_mysql_execute_command,
|
||||
trampoline_mysql_execute_size, true);
|
||||
trampoline_mysql_execute_size, true, &trampoline_mysql_execute_saved_code);
|
||||
trampoline_mysql_execute_size = 0;
|
||||
trampoline_mysql_execute_saved_code.size = 0;
|
||||
}
|
||||
|
||||
int is_remove_patches(ThdSesData *pThdData)
|
||||
@@ -1083,10 +1118,10 @@ static void audit_end_connection(THD *thd)
|
||||
|
||||
static bool parse_thd_offsets_string (char *poffsets_string)
|
||||
{
|
||||
char offset_str[2048] = {0};
|
||||
char offset_str[2049] = {0};
|
||||
char *poffset_str = offset_str;
|
||||
|
||||
strncpy(poffset_str,poffsets_string,array_elements(offset_str));
|
||||
strncpy(poffset_str,poffsets_string,array_elements(offset_str)-1);
|
||||
|
||||
char *comma_delimiter = strchr(poffset_str, ',');
|
||||
size_t i = 0;
|
||||
@@ -1197,9 +1232,16 @@ static bool validate_offsets(const ThdOffsets *offset)
|
||||
(*(const char **) (((unsigned char *) sctx) + offset->sec_ctx_user)) = user_test_val;
|
||||
}
|
||||
|
||||
#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80000
|
||||
PSI_mutex_key key_LOCK_thd_query_validate=99999;
|
||||
mysql_mutex_init(key_LOCK_thd_query_validate, &thd->LOCK_thd_query, MY_MUTEX_INIT_FAST);
|
||||
#endif
|
||||
char buffer[2048] = {0};
|
||||
thd_security_context(thd, buffer, 2048, 1000);
|
||||
|
||||
#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80000
|
||||
mysql_mutex_destroy(&thd->LOCK_thd_query);
|
||||
#endif
|
||||
// verfiy our buffer contains query id
|
||||
if (strstr(buffer, " 789") == NULL || strstr(buffer, user_test_val) == NULL)
|
||||
{
|
||||
@@ -1739,7 +1781,7 @@ static void *trampoline_mem_free = NULL;
|
||||
* Utility method for hot patching
|
||||
*/
|
||||
static int do_hot_patch(void ** trampoline_func_pp, unsigned int * trampoline_size,
|
||||
void* target_function, void* audit_function, const char * func_name)
|
||||
void* target_function, void* audit_function, const char * func_name, SavedCode* saved_code)
|
||||
{
|
||||
// 16 byte align the pointer
|
||||
DATATYPE_ADDRESS addrs = (DATATYPE_ADDRESS)trampoline_mem_free + 15;
|
||||
@@ -1748,7 +1790,7 @@ static int do_hot_patch(void ** trampoline_func_pp, unsigned int * trampoline_si
|
||||
// hot patch functions
|
||||
unsigned int used_size;
|
||||
int res = hot_patch_function(target_function, audit_function,
|
||||
*trampoline_func_pp, trampoline_size, &used_size, true);
|
||||
*trampoline_func_pp, trampoline_size, &used_size, true, saved_code);
|
||||
if (res != 0)
|
||||
{
|
||||
// hot patch failed.
|
||||
@@ -1764,7 +1806,7 @@ static int do_hot_patch(void ** trampoline_func_pp, unsigned int * trampoline_si
|
||||
}
|
||||
|
||||
#define DECLARE_STRING_ARR_UPDATE_FUNC(NAME) \
|
||||
static void NAME ## _string_update(THD *thd, struct st_mysql_sys_var *var, void *tgt, const void *save)\
|
||||
static void NAME ## _string_update(THD *thd, SYS_VAR *var, void *tgt, const void *save)\
|
||||
{\
|
||||
num_ ## NAME = string_to_array(save, NAME ## _array, array_elements( NAME ## _array), sizeof( NAME ## _array[0]));\
|
||||
/* handle "set global audit_xxx = null;" */ \
|
||||
@@ -1788,7 +1830,7 @@ DECLARE_STRING_ARR_UPDATE_FUNC(password_masking_cmds)
|
||||
DECLARE_STRING_ARR_UPDATE_FUNC(whitelist_users)
|
||||
DECLARE_STRING_ARR_UPDATE_FUNC(record_objs)
|
||||
|
||||
static void password_masking_regex_string_update(THD *thd, struct st_mysql_sys_var *var, void *tgt, const void *save)
|
||||
static void password_masking_regex_string_update(THD *thd, SYS_VAR *var, void *tgt, const void *save)
|
||||
{
|
||||
const char *str_val = "";
|
||||
char *const* save_p = static_cast<char*const*>(save);
|
||||
@@ -1846,7 +1888,7 @@ static void replace_char(char *str, const char tofind, const char rplc)
|
||||
}
|
||||
}
|
||||
|
||||
static void json_socket_name_update(THD *thd, struct st_mysql_sys_var *var, void *tgt, const void *save)
|
||||
static void json_socket_name_update(THD *thd, SYS_VAR *var, void *tgt, const void *save)
|
||||
{
|
||||
const char *str_val = NULL;
|
||||
char *const* save_p = static_cast<char*const*>(save);
|
||||
@@ -1917,7 +1959,7 @@ static void json_socket_name_update(THD *thd, struct st_mysql_sys_var *var, void
|
||||
}
|
||||
|
||||
// check that the regex compiles. Return 0 on success.
|
||||
static int password_masking_regex_check(THD *thd, struct st_mysql_sys_var *var, void *save, st_mysql_value *value)
|
||||
static int password_masking_regex_check(THD *thd, SYS_VAR *var, void *save, st_mysql_value *value)
|
||||
{
|
||||
int length = array_elements(password_masking_regex_check_buff);
|
||||
const char *str = value->val_str(value, password_masking_regex_check_buff, &length);
|
||||
@@ -1937,7 +1979,7 @@ static int password_masking_regex_check(THD *thd, struct st_mysql_sys_var *var,
|
||||
}
|
||||
|
||||
// extended method to set also record_empty_objs_set
|
||||
static void record_objs_string_update_extended(THD *thd, struct st_mysql_sys_var *var, void *tgt, const void *save)
|
||||
static void record_objs_string_update_extended(THD *thd, SYS_VAR *var, void *tgt, const void *save)
|
||||
{
|
||||
record_objs_string_update(thd, var, tgt, save);
|
||||
if (num_record_objs > 0) // check if to record also the empty set of objects
|
||||
@@ -1962,10 +2004,24 @@ static void record_objs_string_update_extended(THD *thd, struct st_mysql_sys_var
|
||||
* 0 success
|
||||
* 1 failure
|
||||
*/
|
||||
|
||||
#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 80000
|
||||
bool (*compat::_vio_socket_connect)(MYSQL_VIO vio, struct sockaddr *addr, socklen_t len, int timeout);
|
||||
bool (*compat::_vio_socket_connect_80016)(MYSQL_VIO vio, struct sockaddr *addr, socklen_t len, bool nonblocking, int timeout);
|
||||
bool (*compat::_vio_socket_connect_80020)(MYSQL_VIO vio, struct sockaddr *addr, socklen_t len, bool nonblocking, int timeout, bool *connect_done);
|
||||
#endif
|
||||
static int audit_plugin_init(void *p)
|
||||
{
|
||||
|
||||
DBUG_ENTER("audit_plugin_init");
|
||||
#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 80000
|
||||
const bool compat_init_ok = compat::init();
|
||||
if (!compat_init_ok)
|
||||
{
|
||||
sql_print_error("%s unable to init compatibility layer. Aborting.", log_prefix);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __x86_64__
|
||||
const char * arch = "64bit";
|
||||
@@ -2080,7 +2136,7 @@ static int audit_plugin_init(void *p)
|
||||
trampoline_mem = NULL;
|
||||
|
||||
#ifdef __x86_64__
|
||||
size_t func_in_mysqld = (size_t)log_slow_statement;
|
||||
size_t func_in_mysqld = (size_t)check_table_access;
|
||||
size_t func_in_plugin = (size_t)trampoline_dummy_func_for_mem;
|
||||
if (func_in_mysqld < INT_MAX && func_in_plugin > INT_MAX)
|
||||
{
|
||||
@@ -2141,14 +2197,14 @@ static int audit_plugin_init(void *p)
|
||||
#endif
|
||||
|
||||
if (do_hot_patch((void **)&trampoline_mysql_execute_command, &trampoline_mysql_execute_size,
|
||||
target_function, (void *)audit_mysql_execute_command, "mysql_execute_command"))
|
||||
target_function, (void *)audit_mysql_execute_command, "mysql_execute_command", &trampoline_mysql_execute_saved_code))
|
||||
{
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
#if MYSQL_VERSION_ID < 50600
|
||||
if (do_hot_patch((void **)&trampoline_log_slow_statement, &trampoline_log_slow_statement_size,
|
||||
(void *)log_slow_statement, (void *)audit_log_slow_statement, "log_slow_statement"))
|
||||
(void *)log_slow_statement, (void *)audit_log_slow_statement, "log_slow_statement", &trampoline_log_slow_statement_saved_code))
|
||||
{
|
||||
sql_print_error("%s Failed hot patch. Continuing as non-critical.",
|
||||
log_prefix);
|
||||
@@ -2156,13 +2212,14 @@ static int audit_plugin_init(void *p)
|
||||
}
|
||||
|
||||
if (do_hot_patch((void **)&trampoline_acl_authenticate, &trampoline_acl_authenticate_size,
|
||||
(void *)acl_authenticate, (void *)audit_acl_authenticate, "acl_authenticate"))
|
||||
(void *)acl_authenticate, (void *)audit_acl_authenticate, "acl_authenticate", &trampoline_acl_authenticate_saved_code))
|
||||
{
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
|
||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 50709
|
||||
int (Query_cache::*pf_send_result_to_client)(THD *,char *, uint) = &Query_cache::send_result_to_client;
|
||||
#else
|
||||
@@ -2170,18 +2227,22 @@ static int audit_plugin_init(void *p)
|
||||
#endif
|
||||
target_function = *(void **) &pf_send_result_to_client;
|
||||
if (do_hot_patch((void **)&trampoline_send_result_to_client, &trampoline_send_result_to_client_size,
|
||||
(void *)target_function, (void *)audit_send_result_to_client, "send_result_to_client"))
|
||||
(void *)target_function, (void *)audit_send_result_to_client, "send_result_to_client", &trampoline_send_result_to_client_saved_code))
|
||||
{
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (do_hot_patch((void **)&trampoline_check_table_access, &trampoline_check_table_access_size,
|
||||
(void *)check_table_access, (void *)audit_check_table_access, "check_table_access"))
|
||||
(void *)check_table_access, (void *)audit_check_table_access, "check_table_access", &trampoline_check_table_access_saved_code))
|
||||
{
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100108
|
||||
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID == 100224
|
||||
target_function = (void *)*(bool (*)(THD *thd, const DDL_options_st &options, TABLE_LIST **start, uint *counter,
|
||||
Sroutine_hash_entry **sroutine_to_open, uint flags, Prelocking_strategy *prelocking_strategy)) &open_tables;
|
||||
#elif defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100108
|
||||
target_function = (void *)*(bool (*)(THD *thd, const DDL_options_st &options, TABLE_LIST **start, uint *counter, uint flags,
|
||||
Prelocking_strategy *prelocking_strategy)) &open_tables;
|
||||
#elif MYSQL_VERSION_ID > 50505
|
||||
@@ -2191,7 +2252,7 @@ static int audit_plugin_init(void *p)
|
||||
target_function = (void *)*(int (*)(THD *thd, TABLE_LIST **start, uint *counter, uint flags)) &open_tables;
|
||||
#endif
|
||||
if (do_hot_patch((void **)&trampoline_open_tables, &trampoline_open_tables_size,
|
||||
(void *)target_function, (void *)audit_open_tables, "open_tables"))
|
||||
(void *)target_function, (void *)audit_open_tables, "open_tables", &trampoline_open_tables_saved_code))
|
||||
{
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
@@ -2199,7 +2260,7 @@ static int audit_plugin_init(void *p)
|
||||
#if defined(MARIADB_BASE_VERSION)
|
||||
target_function = (void*) end_connection;
|
||||
if (do_hot_patch((void **)&trampoline_end_connection, &trampoline_end_connection_size,
|
||||
(void *)target_function, (void *)audit_end_connection, "end_connection"))
|
||||
(void *)target_function, (void *)audit_end_connection, "end_connection", &trampoline_end_connection_saved_code))
|
||||
{
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
@@ -2239,7 +2300,7 @@ static int audit_plugin_deinit(void *p)
|
||||
Plugin status variables for SHOW STATUS
|
||||
*/
|
||||
|
||||
static struct st_mysql_show_var audit_status[] =
|
||||
static SHOW_VAR audit_status[] =
|
||||
{
|
||||
{ "Audit_version",
|
||||
(char *) MYSQL_AUDIT_PLUGIN_VERSION "-" MYSQL_AUDIT_PLUGIN_REVISION,
|
||||
@@ -2260,32 +2321,32 @@ static struct st_mysql_show_var audit_status[] =
|
||||
|
||||
|
||||
|
||||
static void json_log_file_enable(THD *thd, struct st_mysql_sys_var *var,
|
||||
static void json_log_file_enable(THD *thd, SYS_VAR *var,
|
||||
void *tgt, const void *save)
|
||||
{
|
||||
json_file_handler_enable = *(my_bool *) save ? TRUE : FALSE;
|
||||
json_file_handler_enable = *(my_bool *) save ? true : false;
|
||||
if (json_file_handler.is_init())
|
||||
{
|
||||
json_file_handler.set_enable(json_file_handler_enable);
|
||||
}
|
||||
}
|
||||
|
||||
static void json_log_file_flush(THD *thd, struct st_mysql_sys_var *var,
|
||||
static void json_log_file_flush(THD *thd, SYS_VAR *var,
|
||||
void *tgt, const void *save)
|
||||
{
|
||||
// always set to false. as we just flush if set to true and leave at 0
|
||||
json_file_handler_flush = FALSE;
|
||||
my_bool val = *(my_bool *) save ? TRUE : FALSE;
|
||||
json_file_handler_flush = false;
|
||||
my_bool val = *(my_bool *) save ? true : false;
|
||||
if (val && json_file_handler.is_init())
|
||||
{
|
||||
json_file_handler.flush();
|
||||
}
|
||||
}
|
||||
|
||||
static void json_log_socket_enable(THD *thd, struct st_mysql_sys_var *var,
|
||||
static void json_log_socket_enable(THD *thd, SYS_VAR *var,
|
||||
void *tgt, const void *save)
|
||||
{
|
||||
json_socket_handler_enable = *(my_bool *) save ? TRUE : FALSE;
|
||||
json_socket_handler_enable = *(my_bool *) save ? true : false;
|
||||
if (json_socket_handler.is_init())
|
||||
{
|
||||
json_socket_handler.set_enable(json_socket_handler_enable);
|
||||
@@ -2456,7 +2517,7 @@ static MYSQL_SYSVAR_ENUM(before_after, before_after_mode,
|
||||
/*
|
||||
* Plugin system vars
|
||||
*/
|
||||
static struct st_mysql_sys_var* audit_system_variables[] =
|
||||
static SYS_VAR* audit_system_variables[] =
|
||||
{
|
||||
#ifdef HAVE_SESS_CONNECT_ATTRS
|
||||
MYSQL_SYSVAR(sess_connect_attrs),
|
||||
@@ -2508,12 +2569,18 @@ mysql_declare_plugin(audit_plugin)
|
||||
"McAfee Inc",
|
||||
"AUDIT plugin, creates a file mysql-audit.log to log activity",
|
||||
PLUGIN_LICENSE_GPL,
|
||||
audit_plugin_init, /* Plugin Init */
|
||||
audit_plugin_deinit, /* Plugin Deinit */
|
||||
0x0100 /* 1.0 */,
|
||||
audit_status, /* status variables */
|
||||
audit_plugin_init, /* Plugin Init */
|
||||
#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80000
|
||||
nullptr, /* check uninstall function */
|
||||
#endif
|
||||
audit_plugin_deinit, /* Plugin Deinit */
|
||||
0x0100 /* 1.0 */,
|
||||
audit_status, /* status variables */
|
||||
audit_system_variables, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
#if MYSQL_VERSION_ID >= 50516
|
||||
0 /* flags for plugin */
|
||||
#endif
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ static void WriteJump32(void *pAddress, ULONG_PTR JumpTo)
|
||||
// Hooks a function
|
||||
//
|
||||
static bool HookFunction(ULONG_PTR targetFunction, ULONG_PTR newFunction, ULONG_PTR trampolineFunction,
|
||||
unsigned int *trampolinesize, unsigned int *usedsize)
|
||||
unsigned int *trampolinesize, unsigned int *usedsize, SavedCode* saved_code)
|
||||
{
|
||||
#define MAX_INSTRUCTIONS 100
|
||||
uint8_t raw[MAX_INSTRUCTIONS];
|
||||
@@ -293,6 +293,9 @@ static bool HookFunction(ULONG_PTR targetFunction, ULONG_PTR newFunction, ULONG_
|
||||
ud_obj.operand[0].type == UD_OP_JIMM)
|
||||
{
|
||||
bool cannot_disassemble = true;
|
||||
sql_print_information("ud_obj.mnemonic == UD_Ijmp: %d", ud_obj.mnemonic == UD_Ijmp);
|
||||
sql_print_information("ud_obj.mnemonic == UD_Icall: %d", ud_obj.mnemonic == UD_Icall);
|
||||
sql_print_information("ud_obj.operand[0].type == UD_OP_JIMM: %d", ud_obj.operand[0].type == UD_OP_JIMM);
|
||||
|
||||
#ifdef __i386__
|
||||
const BYTE *pc = (const BYTE *)targetFunction + InstrSize;
|
||||
@@ -324,7 +327,59 @@ static bool HookFunction(ULONG_PTR targetFunction, ULONG_PTR newFunction, ULONG_
|
||||
cannot_disassemble = false;
|
||||
}
|
||||
}
|
||||
sql_print_error("in __i386__");
|
||||
|
||||
#else
|
||||
// If there is a relative jump or call in the to be overwritten chunk,
|
||||
// construct an absolute jump/call in the trampoline.
|
||||
#ifdef __x86_64__
|
||||
sql_print_information("__x86_64__");
|
||||
#endif
|
||||
if (ud_obj.operand[0].type == UD_OP_JIMM && (ud_obj.mnemonic == UD_Ijmp || ud_obj.mnemonic == UD_Icall)) {
|
||||
// jump or call
|
||||
size_t rewrite_size = 0;
|
||||
switch (ud_obj.mnemonic) {
|
||||
case UD_Ijmp:
|
||||
sql_print_information("rewriting relative jump as absolute");
|
||||
memcpy((void*)(trampolineFunction + uCurrentSize), "\xff\x25\x00\x00\x00\x00", 6); // jmpq *0x0(%rip)
|
||||
rewrite_size = 6;
|
||||
break;
|
||||
case UD_Icall:
|
||||
sql_print_information("rewriting relative call as absolute");
|
||||
memcpy((void*)(trampolineFunction + uCurrentSize), "\xff\x15\x02\x00\x00\x00", 6); // callq *0x2(%rip) -- call the function via the address stored at RIP+2
|
||||
memcpy((void*)(trampolineFunction + uCurrentSize + 6), "\xeb\x08", 2); // jmp 0x08 -- jump over the function address (8 bytes forward)
|
||||
rewrite_size = 8;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// calculate the jump target from the instruction pointer and the immediate operand
|
||||
unsigned long jump_target = ud_obj.pc;
|
||||
switch (ud_obj.operand[0].size) {
|
||||
case 8:
|
||||
jump_target += ud_obj.operand[0].lval.sbyte;
|
||||
break;
|
||||
case 16:
|
||||
jump_target += ud_obj.operand[0].lval.sword;
|
||||
break;
|
||||
case 32:
|
||||
jump_target += ud_obj.operand[0].lval.sdword;
|
||||
break;
|
||||
}
|
||||
memcpy((void*)(trampolineFunction + uCurrentSize + rewrite_size), &jump_target, 8);
|
||||
rewrite_size += 8;
|
||||
|
||||
// update the indexes
|
||||
uCurrentSize += rewrite_size;
|
||||
InstrSize += ud_insn_len (&ud_obj);
|
||||
|
||||
// clear the flag
|
||||
cannot_disassemble = false;
|
||||
|
||||
sql_print_information("target address: [0x%016lx]", jump_target);
|
||||
sql_print_information("original instruction: [%s]", ud_insn_asm(&ud_obj));
|
||||
}
|
||||
#endif
|
||||
if (cannot_disassemble)
|
||||
{
|
||||
@@ -381,8 +436,17 @@ static bool HookFunction(ULONG_PTR targetFunction, ULONG_PTR newFunction, ULONG_
|
||||
return false;
|
||||
}
|
||||
|
||||
WriteJump((BYTE*)trampolineFunction + uCurrentSize, targetFunction + InstrSize);
|
||||
// Save the original code that is going to be overwitten by the jump.
|
||||
// The code in the trampoline can be larger due to rewriting of RIP
|
||||
// relative instructions and unsuitable for writting back on unhook.
|
||||
memcpy(saved_code->code, (void*)targetFunction, InstrSize);
|
||||
saved_code->size = InstrSize;
|
||||
|
||||
// jump from trampoline back to continue the original function
|
||||
WriteJump((BYTE*)trampolineFunction + uCurrentSize, targetFunction + InstrSize);
|
||||
*usedsize = uCurrentSize + JUMP_SIZE;
|
||||
|
||||
// jump from the begin of the original function to our function
|
||||
#ifndef __x86_64__
|
||||
WriteJump((void *) targetFunction, newFunction);
|
||||
#else
|
||||
@@ -411,7 +475,7 @@ static bool HookFunction(ULONG_PTR targetFunction, ULONG_PTR newFunction, ULONG_
|
||||
//
|
||||
|
||||
|
||||
static void UnhookFunction(ULONG_PTR Function, ULONG_PTR trampolineFunction, unsigned int trampolinesize)
|
||||
static void UnhookFunction(ULONG_PTR Function, ULONG_PTR trampolineFunction, unsigned int trampolinesize, SavedCode* saved_code)
|
||||
{
|
||||
DATATYPE_ADDRESS FunctionPage = get_page_address((void*)Function);
|
||||
if (unprotect((void*)FunctionPage, PAGE_SIZE) != 0)
|
||||
@@ -421,7 +485,7 @@ static void UnhookFunction(ULONG_PTR Function, ULONG_PTR trampolineFunction, uns
|
||||
log_prefix, (void *) FunctionPage);
|
||||
return;
|
||||
}
|
||||
memcpy((void *) Function, (void*)trampolineFunction,trampolinesize);
|
||||
memcpy((void *) Function, saved_code->code, saved_code->size);
|
||||
protect((void*)FunctionPage, PAGE_SIZE);
|
||||
}
|
||||
|
||||
@@ -442,12 +506,12 @@ static void UnhookFunction(ULONG_PTR Function, ULONG_PTR trampolineFunction, uns
|
||||
* @Return 0 on success otherwise failure
|
||||
* @See MS Detours paper: http:// research.microsoft.com/pubs/68568/huntusenixnt99.pdf for some background info.
|
||||
*/
|
||||
int hot_patch_function(void *targetFunction, void *newFunction, void *trampolineFunction, unsigned int *trampolinesize, unsigned int *usedsize, bool info_print)
|
||||
int hot_patch_function(void *targetFunction, void *newFunction, void *trampolineFunction, unsigned int *trampolinesize, unsigned int *usedsize, bool info_print, SavedCode* saved_code)
|
||||
{
|
||||
DATATYPE_ADDRESS trampolinePage = get_page_address(trampolineFunction);
|
||||
cond_info_print(info_print, "%s hot patching function: %p, trampolineFunction: %p trampolinePage: %p",log_prefix, (void *)targetFunction, (void *)trampolineFunction, (void *)trampolinePage);
|
||||
if (HookFunction((ULONG_PTR) targetFunction, (ULONG_PTR) newFunction,
|
||||
(ULONG_PTR) trampolineFunction, trampolinesize, usedsize))
|
||||
(ULONG_PTR) trampolineFunction, trampolinesize, usedsize, saved_code))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -466,15 +530,18 @@ int hot_patch_function(void *targetFunction, void *newFunction, void *trampoline
|
||||
* @param trampolineFunction a function which contains a jump back to the targetFunction.
|
||||
* @param log_file if not null will log about progress of installing the plugin
|
||||
*/
|
||||
void remove_hot_patch_function(void *targetFunction, void *trampolineFunction, unsigned int trampolinesize, bool info_print)
|
||||
void remove_hot_patch_function(void *targetFunction, void *trampolineFunction, unsigned int trampolinesize, bool info_print, SavedCode* saved_code)
|
||||
{
|
||||
if (trampolinesize == 0)
|
||||
sql_print_information("trampolinesize: %d", trampolinesize);
|
||||
sql_print_information("saved_code->size: %zd", saved_code->size);
|
||||
if (trampolinesize == 0 || !saved_code->size)
|
||||
{
|
||||
// nothing todo. As hot patch was not set.
|
||||
return;
|
||||
cond_info_print(info_print, "%s not removing as hot patch was not set: %p",log_prefix, (void *)targetFunction);
|
||||
return;
|
||||
}
|
||||
DATATYPE_ADDRESS targetPage = get_page_address(targetFunction);
|
||||
cond_info_print(info_print, "%s removing hot patching function: %p targetPage: %p trampolineFunction: %p",log_prefix, (void *)targetFunction, (void *)targetPage, (void *)trampolineFunction);
|
||||
UnhookFunction ((ULONG_PTR) targetFunction, (ULONG_PTR)trampolineFunction,trampolinesize);
|
||||
UnhookFunction ((ULONG_PTR) targetFunction, (ULONG_PTR)trampolineFunction,trampolinesize, saved_code);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -22,3 +22,6 @@ libudis86_la_SOURCES = itab.c \
|
||||
|
||||
itab.c itab.h: ../docs/x86optable.xml opgen.py
|
||||
python ./opgen.py
|
||||
|
||||
# generate the generated sources prior to the compilation
|
||||
BUILT_SOURCES = itab.c itab.h
|
||||
|
||||
Reference in New Issue
Block a user