summaryrefslogtreecommitdiff
path: root/net-analyzer/pmacct/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/pmacct/files')
-rw-r--r--net-analyzer/pmacct/files/pmacct-1.7.6-fix-mysql-crash.patch26
-rw-r--r--net-analyzer/pmacct/files/pmacct-1.7.6-nogit.patch16
2 files changed, 42 insertions, 0 deletions
diff --git a/net-analyzer/pmacct/files/pmacct-1.7.6-fix-mysql-crash.patch b/net-analyzer/pmacct/files/pmacct-1.7.6-fix-mysql-crash.patch
new file mode 100644
index 000000000000..b76ce8761326
--- /dev/null
+++ b/net-analyzer/pmacct/files/pmacct-1.7.6-fix-mysql-crash.patch
@@ -0,0 +1,26 @@
+From 1922062277d87da024938cc3057df9a4c3725e76 Mon Sep 17 00:00:00 2001
+From: Paolo Lucente <pl+github@pmacct.net>
+Date: Sun, 28 Feb 2021 02:51:10 +0000
+Subject: [PATCH] * fix, MySQL plugin: check for 'unix:' string only if
+ sql_host is supplied
+
+---
+ src/mysql_plugin.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/mysql_plugin.c b/src/mysql_plugin.c
+index 7f5179abd..dce117732 100644
+--- a/src/mysql_plugin.c
++++ b/src/mysql_plugin.c
+@@ -695,7 +695,10 @@ void MY_DB_Connect(struct DBdesc *db, char *host)
+ mysql_options(db->desc, MYSQL_OPT_RECONNECT, &reconnect);
+ if (config.sql_conn_ca_file) mysql_ssl_set(db->desc, NULL, NULL, config.sql_conn_ca_file, NULL, NULL);
+
+- usp = strstr(host, "unix:");
++ if (host) {
++ usp = strstr(host, "unix:");
++ }
++
+ if (usp && usp == host) {
+ usp += 5; /* go right past the 'unix:' string */
+ mysql_ret = mysql_real_connect(db->desc, NULL, config.sql_user, config.sql_passwd, config.sql_db, FALSE, usp, 0);
diff --git a/net-analyzer/pmacct/files/pmacct-1.7.6-nogit.patch b/net-analyzer/pmacct/files/pmacct-1.7.6-nogit.patch
new file mode 100644
index 000000000000..7381408d4489
--- /dev/null
+++ b/net-analyzer/pmacct/files/pmacct-1.7.6-nogit.patch
@@ -0,0 +1,16 @@
+diff --git a/configure.ac b/configure.ac
+index 34269bd9..c6dbe8ba 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1140,10 +1140,7 @@ dnl Git submodule Dependencies buid system
+ dnl --------------------------------------
+
+ dnl First check whether to build git submodule deps
+-WITH_EXTERNAL_DEPS_DEFAULT=yes
+-if [ test ! -f "$srcdir/src/external_libs/libcdada/include/cdada.h" ] && [ test -z `git rev-parse HEAD 2> /dev/null` ]; then
+- WITH_EXTERNAL_DEPS_DEFAULT=no
+-fi
++WITH_EXTERNAL_DEPS_DEFAULT=no
+
+ AC_MSG_CHECKING([whether external dependencies (git submodules) should be compiled])
+ AC_ARG_WITH(external-deps,