summaryrefslogtreecommitdiff
path: root/plugin/server_audit/server_audit.c
Commit message (Collapse)AuthorAgeFilesLines
* server_audit and server_audit2 fixed to produce messages with uniformedAlexey Botchkov2020-09-031-3/+3
| | | | | | timestamps. also undeterministic tests disabled for now.
* Merge 10.4 into 10.5Marko Mäkelä2020-08-141-28/+32
|\
| * Merge 10.3 into 10.4, except MDEV-22543Marko Mäkelä2020-08-131-28/+32
| |\ | | | | | | | | | Also, fix GCC -Og -Wmaybe-uninitialized in run_backup_stage()
| | * Merge 10.2 into 10.3Marko Mäkelä2020-08-131-28/+32
| | |\
| | | * Fix GCC 10.2.0 -Og -Wmaybe-uninitializedMarko Mäkelä2020-08-111-28/+32
| | | | | | | | | | | | | | | | | | | | | | | | For some reason, GCC emits more -Wmaybe-uninitialized warnings when using the flag -Og than when using -O2. Many of the warnings look genuine.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-051-1/+2
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-05-051-1/+2
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-05-041-1/+2
| | |\ \ | | | |/
| | | * MDEV-20685: compile fixes for Solaris/OSX/AIXDaniel Black2020-04-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sig_return: Solaris/OSX returns different function ptr Move defination to my_alarm.h as its the only use. prevents compile warnings (copied from 10.3 branch) mysys/my_sync.c:136:19: error: 'cur_dir_name' defined but not used [-Werror=unused-const-variable=] 136 | static const char cur_dir_name[]= {FN_CURLIB, 0}; | ^~~~~~~~~~~~ fix compile error (DEPRECATED) leaked from ssl headers. In file included from /export/home/dan/mariadb-server-10.4/sql/sys_vars.cc:37: /export/home/dan/mariadb-server-10.4/sql/sys_vars.ic:69: error: "DEPRECATED" redefined [-Werror] 69 | #define DEPRECATED(X) X | In file included from /export/home/dan/mariadb-server-10.4/include/violite.h:150, from /export/home/dan/mariadb-server-10.4/sql/sql_class.h:38, from /export/home/dan/mariadb-server-10.4/sql/sys_vars.cc:36: /usr/include/openssl/ssl.h:2356: note: this is the location of the previous definition 2356 | # define DEPRECATED __attribute__((deprecated)) | Avoid Werror condition on non-Linux: plugin/server_audit/server_audit.c:2267:7: error: variable 'db_len_off' set but not used [-Werror=unused-but-set-variable] 2267 | int db_len_off; | ^~~~~~~~~~ plugin/server_audit/server_audit.c:2266:7: error: variable 'db_off' set but not used [-Werror=unused-but-set-variable] 2266 | int db_off; | ^~~~~~ auth_gssapi fix include path for Solaris Consistent with the upstream packaged patch: https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/database/mariadb-103/patches/06-gssapi.h.patch compile warnings on Solaris [ 91%] Building C object plugin/server_audit/CMakeFiles/server_audit.dir/server_audit.c.o /plugin/server_audit/server_audit.c: In function 'auditing_v8': /plugin/server_audit/server_audit.c:2194:20: error: unused variable 'db_len_off' [-Werror=unused-variable] 2194 | static const int db_len_off= 128; | ^~~~~~~~~~ /plugin/server_audit/server_audit.c:2193:20: error: unused variable 'db_off' [-Werror=unused-variable] 2193 | static const int db_off= 120; | ^~~~~~ /plugin/server_audit/server_audit.c:2192:20: error: unused variable 'cmd_off' [-Werror=unused-variable] 2192 | static const int cmd_off= 4432; | ^~~~~~~ At top level: /plugin/server_audit/server_audit.c:2192:20: error: 'cmd_off' defined but not used [-Werror=unused-const-variable=] /plugin/server_audit/server_audit.c:2193:20: error: 'db_off' defined but not used [-Werror=unused-const-variable=] 2193 | static const int db_off= 120; | ^~~~~~ /plugin/server_audit/server_audit.c:2194:20: error: 'db_len_off' defined but not used [-Werror=unused-const-variable=] 2194 | static const int db_len_off= 128; | ^~~~~~~~~~ cc1: all warnings being treated as errors tested on: $ uname -a SunOS openindiana 5.11 illumos-b97b1727bc i86pc i386 i86pc
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-04-251-3/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | The functional changes of commit 5836191c8f0658d5d75484766fdcc3d838b0a5c1 (MDEV-21168) are omitted due to MDEV-742 having addressed the issue.
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-04-161-3/+3
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | In main.index_merge_myisam we remove the test that was added in commit a2d24def8cc42d27c72d833abfb39ef24a2b96ba because it duplicates the test case that was added in commit 5af12e463549e4bbc2ce6ab720d78937d5e5db4e.
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-04-151-2/+2
| | |\ \ | | | |/
| | | * MDEV-20604: Duplicate key value is silently truncated to 64 characters in ↵Oleksandr Byelkin2020-04-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | print_keydup_error Added indication of truncated string for "s" and "M" formats
* | | | MDEV-22214 mariadbd.exe calls function mysqld.exe, and crashesVladislav Vaintroub2020-04-101-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop linking plugins to the server executable on Windows. Instead, extract whole server functionality into a large DLL, called server.dll. Link both plugins, and small server "stub" exe to it. This eliminates plugin dependency on the name of the server executable. It also reduces the size of the packages (since tiny mysqld.exe and mariadbd.exe are now both linked to one big DLL) Also, simplify the functionality of exporing all symbols from selected static libraries. Rely on WINDOWS_EXPORT_ALL_SYMBOLS, rather than old self-backed solution. fix compile error replace GetProcAddress(GetModuleHandle(NULL), "variable_name") for server exported data with actual variable names. Runtime loading was never required,was error prone , since symbols could be missing at runtime, and now it actually failed, because we do not export symbols from executable anymore, but from a shared library This did require a MYSQL_PLUGIN_IMPORT decoration for the plugin, but made the code more straightforward, and avoids missing symbols at runtime (as mentioned before). The audit plugin is still doing some dynamic loading, as it aims to work cross-version. Now it won't work cross-version on Windows, as it already uses some symbols that are *not* dynamically loaded, e.g fn_format and those symbols now exported from server.dll , when earlier they were exported by mysqld.exe Windows, fixes for storage engine plugin loading after various rebranding stuff Create server.dll containing functionality of the whole server make mariadbd.exe/mysqld.exe a stub that is only calling mysqld_main() fix build
* | | | perfschema memory related instrumentation changesSergei Golubchik2020-03-101-1/+1
| | | |
* | | | MDEV-18650: Options deprecated in previous versions - multi_range_countVicențiu Ciorbaru2020-02-131-1/+0
|/ / / | | | | | | | | | Remove deprecated system variable multi_range_count. It was ignored from 5.3.
* | | Merge 10.3 into 10.4Eugene Kosov2019-07-261-3/+3
|\ \ \ | |/ /
| * | MDEV-18350 Using audit plugin with MySQL, mysqld crashes when running ↵Alexey Botchkov2019-07-261-3/+3
| | | | | | | | | | | | | | | | | | | | | COM_INIT_DB against invalid database. mysql_event_general structure changed in 10.3. the database_length should be size_t now instead of the int.
* | | Merge 10.3 into 10.4Marko Mäkelä2019-07-251-11/+28
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Eugene Kosov2019-07-161-11/+28
| |\ \ | | |/
| | * Merge 10.1 into 10.2Eugene Kosov2019-07-091-11/+28
| | |\
| | | * Make Win compiler happy about the SERVER_AUDIT code.HF2019-07-061-21/+21
| | | |
| | | * Make Win compiler happy.HF2019-07-051-1/+3
| | | |
| | | * MDEV-19851 server_audit plugin should not allow ↵Alexey Botchkov2019-07-031-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | server_audit_output_type=SYSLOG on Windows. 'syslog' output type disabled on Windows.
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-07-021-43/+68
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-07-021-43/+67
| |\ \ \ | | |/ /
| | * | Merge 10.1 into 10.2Eugene Kosov2019-06-231-43/+67
| | |\ \ | | | |/
| | | * MDEV-18661 loading the audit plugin causes performance regression.Alexey Botchkov2019-06-151-44/+68
| | | | | | | | | | | | | | | | | | | | | | | | Plugin fixed to not lock the LOCK_operations when not active. Server fixed to lock the LOCK_plugin less - do it once per thread and then only if a plugin was installed/uninstalled.
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-05-291-6/+9
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-05-291-6/+9
| |\ \ \ | | |/ /
| | * | MDEV-17456 Malicious SUPER user can possibly change audit log configuration ↵Alexey Botchkov2019-05-191-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | without leaving traces. Fix for the SET GLOBAL server_audit_loggin=on; added.
* | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
| |\ \ \ | | |/ /
| | * | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| | |\ \ | | | |/
| | | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | | |\
| | | | * Update FSF addressMichal Schorm2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
| | | | * MDEV-15480 Audit plugin does not respect QUERY_DML for audit plugin.Alexey Botchkov2018-05-101-4/+25
| | | | | | | | | | | | | | | | | | | | QUERY_DML_NO_SELECT flag added.
| | | | * MDEV-13921 Audit log writes invalid SQL if single-line comments areAlexey Botchkov2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | present. thread_pool_server_audit.test fixed. plugin version updated.
| | | | * MDEV-13921 Audit log writes invalid SQL if single-line comments areAlexey Botchkov2017-11-031-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | present. Escape special characters (like \r \n \t) instead of replacing them with spaces.
| | | | * MDEV-13137 MySQL 5.6.23 Crashes when SET GLOBAL server_audit_logging=OFF;Alexey Botchkov2017-09-191-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MySQL 5.6 doesn't always send the MYSQL_AUDIT_GENERAL_LOG notification. So we have to suppress the log_current_query() in this case.
* | | | | Merge 10.3 into 10.4Marko Mäkelä2019-05-051-9/+60
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2019-04-291-9/+60
| |\ \ \ \ | | |/ / /
| | * | | Remove a type cast, and use correct format insteadMarko Mäkelä2019-04-291-2/+2
| | | | |
| | * | | Make Win compiler happy.Alexey Botchkov2019-04-291-1/+1
| | | | |
| | * | | MDEV-17456 Malicious SUPER user can possibly change audit log configuration ↵Alexey Botchkov2019-04-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without leaving traces. The 'SET server_audit_logging ' statements should be logged no matter what.
| | * | | MDEV-19141 server_audit_excl_users accepts only values with less than 1024 ↵Alexey Botchkov2019-04-291-6/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chars. Since this limit is imposed by the SHOW_VAR_FUNC_BUFF_SIZE, we just launch the error message.
* | | | | Merge 10.3 into 10.4Marko Mäkelä2019-03-221-6/+7
|\ \ \ \ \ | |/ / / /
| * | | | Merge remote-tracking branch 'origin/10.2' into 10.3Alexander Barkov2019-03-221-6/+7
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2019-03-221-6/+7
| | |\ \ \ | | | |/ /
| | | * | Merge 10.0 into 10.1Marko Mäkelä2019-03-211-6/+7
| | | |\ \