diff --git a/Makefile.am b/Makefile.am
index 0ae979e..7281ae7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,8 @@
## top-level Makefile.am
+clean-local:
+ cd pcre && $(MAKE) $(AM_MAKEFLAGS) clean
+
#Build in these directories:
SUBDIRS = yajl udis86 src
diff --git a/README.md b/README.md
index 68d3fa1..2b98e08 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-MySQL AUDIT Plugin
+AUDIT Plugin for MySQL*
===================
-MySQL AUDIT Plugin is a MySQL plugin from McAfee providing audit capabilities for MySQL,
+A MySQL plugin from McAfee providing audit capabilities for MySQL,
designed with an emphasis on security and audit requirements. The plugin may be used
-as a stand alone audit solution or configured to feed data to external monitoring tools.
+as a standalone audit solution or configured to feed data to external monitoring tools.
Installation and Configuration
@@ -14,12 +14,14 @@ Please check out our wiki on github for detailed installation and configuration
https://github.com/mcafee/mysql-audit/wiki
-Reporting Bugs
+Issues
------------------------------
-Please report bugs to: https://github.com/mcafee/mysql-audit/issues
+Found a bug? Got a feature request or question?
-Please describe the problem verbosely. Try to see if it reproduces and
+Please feel free to report to: https://github.com/mcafee/mysql-audit/issues
+
+If reporting a bug, please describe the problem verbosely. Try to see if it reproduces and
include a detailed description on how to reproduce.
Make sure to include your MySQL Server version and Audit Plugin version.
@@ -35,12 +37,12 @@ Log file location can be queried by running the following command:
Source Code
-------------------------------
-Source code of AUDIT plugin is available at: https://github.com/mcafee/mysql-audit
+Source code is available at: https://github.com/mcafee/mysql-audit
License
-------------------------------
-Copyright (C) 2012 McAfee, Inc.
+Copyright (C) 2016 McAfee, Inc.
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.
@@ -50,3 +52,5 @@ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
See the GNU General Public License for more details.
See COPYING file for a copy of the GPL Version 2 license.
+
+* Other trademarks and brands may be claimed as the property of others.
diff --git a/THIRDPARTY.txt b/THIRDPARTY.txt
index fdf4c7a..2c9286d 100644
--- a/THIRDPARTY.txt
+++ b/THIRDPARTY.txt
@@ -60,3 +60,100 @@ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
+
+%% The following software may be included in this product: PCRE (http://www.pcre.org/)
+
+Use of any of this software is governed by the terms of the license below:
+
+PCRE LICENCE
+------------
+
+PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
+specified below. The documentation for PCRE, supplied in the "doc"
+directory, is distributed under the same terms as the software itself.
+
+The basic library functions are written in C and are freestanding. Also
+included in the distribution is a set of C++ wrapper functions, and a
+just-in-time compiler that can be used to optimize pattern matching. These
+are both optional features that can be omitted when the library is built.
+
+
+THE BASIC LIBRARY FUNCTIONS
+---------------------------
+
+Written by: Philip Hazel
+Email local part: ph10
+Email domain: cam.ac.uk
+
+University of Cambridge Computing Service,
+Cambridge, England.
+
+Copyright (c) 1997-2014 University of Cambridge
+All rights reserved.
+
+
+PCRE JUST-IN-TIME COMPILATION SUPPORT
+-------------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2010-2014 Zoltan Herczeg
+All rights reserved.
+
+
+STACK-LESS JUST-IN-TIME COMPILER
+--------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2009-2014 Zoltan Herczeg
+All rights reserved.
+
+
+THE C++ WRAPPER FUNCTIONS
+-------------------------
+
+Contributed by: Google Inc.
+
+Copyright (c) 2007-2012, Google Inc.
+All rights reserved.
+
+
+THE "BSD" LICENCE
+-----------------
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the name of Google
+ Inc. nor the names of their contributors may be used to endorse or
+ promote products derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+End
diff --git a/compiling.txt b/compiling.txt
index 0b914c9..4742b6e 100644
--- a/compiling.txt
+++ b/compiling.txt
@@ -1,66 +1,79 @@
-Compiling instructions
-=======================
-
-Make sure you have installed the following packages:
-
-autoconf
-automake
-gcc-c++
-
-To compile you will need to obtain the MySQL source code. MySQL source code is available at:
-
-http://dev.mysql.com/downloads/mysql/
-
-==== MySQL 5.1 ======
-
-Extract the MySQL source code in the root directory. For example:
-
-unzip zip-sources/mysql-5.1.40.zip
-
-
-Then run the following command:
-
-cd mysql-5.1.40
-CXX=gcc ./configure
-cd include
-make
-
-Then goto top dir and run:
-
-chmod +x bootstrap.sh
-./bootstrap.sh
-
-This will create configure script. Then run:
-
-CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.1.40
-
-
-==== MySQL 5.5 ======
-
-Extract MySQL 5.5 source code
-
-go to mysql-src dir and run:
-
-cd mysql-5.5.8
-cmake .
-make
-
-back to working dir and run:
-
-CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.5.8 --with-mysql-libservices=mysql-5.5.8/libservices/libmysqlservices.a
-make
-
-==== Compiling with make =====
-
-Go to top source dir and run:
-
-make
-
-Plugin will be compiled at:
-
-src/.libs/libaudit_plugin.so
-
-Some documentation about configure command for mysql:
-
-http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html
-
+Compiling instructions
+=======================
+
+Make sure you have installed the following packages:
+
+autoconf
+automake
+gcc-c++
+
+To compile you will need to obtain the MySQL source code. MySQL source code is available at:
+
+http://dev.mysql.com/downloads/mysql/
+
+==== MySQL 5.1 ======
+
+Extract the MySQL source code in the root directory. For example:
+
+unzip zip-sources/mysql-5.1.40.zip
+
+
+Then run the following command:
+
+cd mysql-5.1.40
+CXX=gcc ./configure
+cd include
+make
+
+Then goto top dir and run:
+
+chmod +x bootstrap.sh
+./bootstrap.sh
+
+This will create configure script. Then run:
+
+CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.1.40
+
+
+==== MySQL 5.5 / 5.6 / 5.7 ======
+
+Extract MySQL 5.5, 5.6, or 5.7 source code
+
+go to mysql-src dir and run:
+
+cd mysql-5.5.x or mysql-5.6.x or mysql-5.7.x
+cmake .
+make
+
+Note: MySQL 5.7 requires Boost 1.59. You may have to install that
+first (see www.boost.org). In such a case, use:
+
+ cmake -DWITH_BOOST=/path/to/boost_1_59_0 .
+
+Note: For MariaDB use: cmake . -DBUILD_CONFIG=mysql_release
+
+Note: to speed things up it is possible to build just the following directories:
+libservices
+extra
+
+back to working dir and run:
+
+chmod +x bootstrap.sh
+./bootstrap.sh
+CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.x.x --with-mysql-libservices=mysql-5.x.x/libservices/libmysqlservices.a
+make
+
+==== Compiling with make =====
+
+Go to top source dir and run:
+
+make
+
+Plugin will be compiled at:
+
+src/.libs/libaudit_plugin.so
+
+Some documentation about configure command for mysql:
+
+http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html
+
diff --git a/config/ac_mysql.m4 b/config/ac_mysql.m4
index 477b32e..8e548ad 100644
--- a/config/ac_mysql.m4
+++ b/config/ac_mysql.m4
@@ -27,8 +27,13 @@ AC_DEFUN([MYSQL_SRC_TEST], [
AC_MSG_ERROR([Failed to find required header file $file in $withval, check the path and make sure you've run './configure ..
\n";
+$inpara = 1;
+}
+
+
+# Main program
+
+$innf = 0;
+$inpara = 0;
+$inpre = 0;
+$wrotetext = 0;
+$toc = 0;
+$ref = 1;
+
+while ($#ARGV >= 0 && $ARGV[0] =~ /^-/)
+ {
+ $toc = 1 if $ARGV[0] eq "-toc";
+ shift;
+ }
+
+# Initial output to STDOUT
+
+print <
+Return to the PCRE index page.
+
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+$ARGV[0] man page
+
+End
+
+print "\n" if ($toc);
+
+open(TEMP, ">/tmp/$$") || die "Can't open /tmp/$$ for output\n";
+
+while (
\n" if ($toc);
+
+# Copy the remainder to the standard output
+
+close(TEMP);
+open(TEMP, "/tmp/$$") || die "Can't open /tmp/$$ for input\n";
+
+print while ( and
that delimit
+ # literal sections will do the spacing. Always skip if no previous output.
+
+ elsif (/^\.sp/)
+ {
+ if ($wrotetext)
+ {
+ $_ =
\n
\n" if ($innf || !/^[\s.]/);
+ }
+ redo; # Now process the lookahead line we just read
+ }
+ }
+ elsif (/^\.TP/ || /^\.PP/ || /^\.P/)
+ {
+ &new_para();
+ }
+ elsif (/^\.SH\s*("?)(.*)\1/)
+ {
+ # Ignore the NAME section
+ if ($2 =~ /^NAME\b/)
+ {
+
$title
\n",
+ $ref);
+ $ref++;
+ }
+ else
+ {
+ print TEMP "
\n$title\n
\n";
+ }
+ }
+ elsif (/^\.SS\s*("?)(.*)\1/)
+ {
+ &end_para();
+ my($title) = &do_line($2);
+ print TEMP "
\n$title\n
\n";
+ }
+ elsif (/^\.B\s*(.*)/)
+ {
+ &new_para() if (!$inpara);
+ $_ = &do_line($1);
+ s/"(.*?)"/$1/g;
+ print TEMP "$_\n";
+ $wrotetext = 1;
+ }
+ elsif (/^\.I\s*(.*)/)
+ {
+ &new_para() if (!$inpara);
+ $_ = &do_line($1);
+ s/"(.*?)"/$1/g;
+ print TEMP "$_\n";
+ $wrotetext = 1;
+ }
+
+ # A comment that starts "HREF" takes the next line as a name that
+ # is turned into a hyperlink, using the text given, which might be
+ # in a special font. If it ends in () or (digits) or punctuation, they
+ # aren't part of the link.
+
+ elsif (/^\.\\"\s*HREF/)
+ {
+ $_=\n";
+ while (
\n";
+ $inpre = 1;
+ }
+ }
+ elsif ($inpre)
+ {
+ print TEMP "
\n";
+ $inpre = 0;
+ }
+
+ # Add
to the end of a non-literal line if we are within .nf/.fi
+
+ $_ .= "
\n" if (!$inpre && $innf);
+
+ print TEMP;
+ $wrotetext = 1;
+ }
+
+# The TOC, if present, will have been written - terminate it
+
+print "