* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/monitoring-plugins/, net-analyzer/monitoring-plugins/files/
@ 2017-10-27 12:45 Michael Orlitzky
0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2017-10-27 12:45 UTC (permalink / raw
To: gentoo-commits
commit: 0de961617a6ad772b0280838a8ab9d850846451a
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 27 12:41:16 2017 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 12:41:16 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0de96161
net-analyzer/monitoring-plugins: new revision to fix build failure with MariaDB.
The latest -r2 adds a patch (which I've sent upstream) to fix a build
failure against newer versions of MariaDB.
Closes: https://bugs.gentoo.org/633548
Package-Manager: Portage-2.3.8, Repoman-2.3.3
.../files/define-own-mysql-port-constant.patch | 102 +++++++++++++++++++++
...-r1.ebuild => monitoring-plugins-2.2-r2.ebuild} | 2 +
2 files changed, 104 insertions(+)
diff --git a/net-analyzer/monitoring-plugins/files/define-own-mysql-port-constant.patch b/net-analyzer/monitoring-plugins/files/define-own-mysql-port-constant.patch
new file mode 100644
index 00000000000..b7406bc9af8
--- /dev/null
+++ b/net-analyzer/monitoring-plugins/files/define-own-mysql-port-constant.patch
@@ -0,0 +1,102 @@
+From d6bd787123aa9ccd96edec8286ec22dd0442c620 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 27 Oct 2017 07:58:43 -0400
+Subject: [PATCH 1/3] plugins/check_mysql*.c: define our own default MySQL
+ port.
+
+The MYSQL_PORT constant used to be defined in mysql.h, and was used as
+the default port in the two plugins check_mysql and check_mysql_query.
+Now that mysql.h no longer defines that constant, our plugins fail to
+build against newer versions of MySQL and MariaDB.
+
+Since MYSQL_PORT used the "default port" on the local system, it
+actually was not the best choice as the default for the check plugins:
+when monitoring remote MySQL servers, the usual default of 3306 is
+more likely to be correct than whatever the local server happens to be
+listening on.
+
+As a result, we fix the issue by defining our own constant, called
+CHECK_PORT_DEFAULT, as "3306" at the top of both check_mysql.c and
+check_mysql_query.c. The existing uses of MYSQL_PORT have been changed
+to use the new CHECK_PORT_DEFAULT.
+
+This change is backwards-incompatible: any users who compiled in a
+MYSQL_PORT other than 3306 and who were running their checks on the
+same server as the database will now need to specify that port
+explicitly.
+
+Closes: https://github.com/monitoring-plugins/monitoring-plugins/issues/1508
+---
+ plugins/check_mysql.c | 8 ++++++--
+ plugins/check_mysql_query.c | 8 ++++++--
+ 2 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
+index 5773afd9..c44919d0 100644
+--- a/plugins/check_mysql.c
++++ b/plugins/check_mysql.c
+@@ -36,6 +36,10 @@ const char *email = "devel@monitoring-plugins.org";
+
+ #define SLAVERESULTSIZE 70
+
++/* The default port that MySQL servers listen on. */
++#define CHECK_PORT_DEFAULT 3306
++
++
+ #include "common.h"
+ #include "utils.h"
+ #include "utils_base.h"
+@@ -58,7 +62,7 @@ char *ciphers = NULL;
+ bool ssl = false;
+ char *opt_file = NULL;
+ char *opt_group = NULL;
+-unsigned int db_port = MYSQL_PORT;
++unsigned int db_port = CHECK_PORT_DEFAULT;
+ int check_slave = 0, warn_sec = 0, crit_sec = 0;
+ int ignore_auth = 0;
+ int verbose = 0;
+@@ -505,7 +509,7 @@ void
+ print_help (void)
+ {
+ char *myport;
+- xasprintf (&myport, "%d", MYSQL_PORT);
++ xasprintf (&myport, "%d", CHECK_PORT_DEFAULT);
+
+ print_revision (progname, NP_VERSION);
+
+diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c
+index 49a14dd3..6f492442 100644
+--- a/plugins/check_mysql_query.c
++++ b/plugins/check_mysql_query.c
+@@ -33,6 +33,10 @@ const char *progname = "check_mysql_query";
+ const char *copyright = "1999-2007";
+ const char *email = "devel@monitoring-plugins.org";
+
++/* The default port that MySQL servers listen on. */
++#define CHECK_PORT_DEFAULT 3306
++
++
+ #include "common.h"
+ #include "utils.h"
+ #include "utils_base.h"
+@@ -48,7 +52,7 @@ char *db_pass = NULL;
+ char *db = NULL;
+ char *opt_file = NULL;
+ char *opt_group = NULL;
+-unsigned int db_port = MYSQL_PORT;
++unsigned int db_port = CHECK_PORT_DEFAULT;
+
+ int process_arguments (int, char **);
+ int validate_arguments (void);
+@@ -299,7 +303,7 @@ void
+ print_help (void)
+ {
+ char *myport;
+- xasprintf (&myport, "%d", MYSQL_PORT);
++ xasprintf (&myport, "%d", CHECK_PORT_DEFAULT);
+
+ print_revision (progname, NP_VERSION);
+
+--
+2.13.6
+
diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r1.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r2.ebuild
similarity index 97%
rename from net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r1.ebuild
rename to net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r2.ebuild
index 951992d4302..76e7997e8b7 100644
--- a/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r1.ebuild
+++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r2.ebuild
@@ -52,6 +52,8 @@ RDEPEND="${DEPEND}
# At least one test is interactive.
RESTRICT="test"
+PATCHES=( "${FILESDIR}/define-own-mysql-port-constant.patch" )
+
src_configure() {
append-flags -fno-strict-aliasing
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/monitoring-plugins/, net-analyzer/monitoring-plugins/files/
@ 2022-02-01 8:17 Joonas Niilola
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2022-02-01 8:17 UTC (permalink / raw
To: gentoo-commits
commit: c9fa9976a7c5fed79242dd70b2b46b1e07da0152
Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sat Jan 8 14:05:43 2022 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Feb 1 08:17:07 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9fa9976
net-analyzer/monitoring-plugins: fix check_disk on btrfs
Closes: https://bugs.gentoo.org/830249
Reported-by: satmd <AT> satmd.de
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/23700
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
...onitoring-plugins-fix-check-disk-on-btrfs.patch | 20 ++++
.../monitoring-plugins-2.3.1-r1.ebuild | 108 +++++++++++++++++++++
2 files changed, 128 insertions(+)
diff --git a/net-analyzer/monitoring-plugins/files/monitoring-plugins-fix-check-disk-on-btrfs.patch b/net-analyzer/monitoring-plugins/files/monitoring-plugins-fix-check-disk-on-btrfs.patch
new file mode 100644
index 000000000000..cbd458372133
--- /dev/null
+++ b/net-analyzer/monitoring-plugins/files/monitoring-plugins-fix-check-disk-on-btrfs.patch
@@ -0,0 +1,20 @@
+https://bugs.gentoo.org/830249
+https://github.com/monitoring-plugins/monitoring-plugins/issues/1357
+https://github.com/monitoring-plugins/monitoring-plugins/commit/e17c1e9ed95b8b9681dccd5a909ac5a02a04416c
+
+diff --git a/plugins/check_disk.c b/plugins/check_disk.c
+index 844e625f..a2735195 100644
+--- a/plugins/check_disk.c
++++ b/plugins/check_disk.c
+@@ -1068,10 +1068,7 @@ get_stats (struct parameter_list *p, struct fs_usage *fsp) {
+
+ void
+ get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
+- /* 2007-12-08 - Workaround for Gnulib reporting insanely high available
+- * space on BSD (the actual value should be negative but fsp->fsu_bavail
+- * is unsigned) */
+- p->available = fsp->fsu_bavail > fsp->fsu_bfree ? 0 : fsp->fsu_bavail;
++ p->available = fsp->fsu_bavail;
+ p->available_to_root = fsp->fsu_bfree;
+ p->used = fsp->fsu_blocks - fsp->fsu_bfree;
+ if (freespace_ignore_reserved) {
diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.1-r1.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.1-r1.ebuild
new file mode 100644
index 000000000000..9c951f0457cf
--- /dev/null
+++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.1-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit flag-o-matic
+
+DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu"
+HOMEPAGE="https://www.monitoring-plugins.org/"
+SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~sparc ~x86"
+IUSE="curl gnutls ipv6 ldap mysql dns fping game postgres radius samba snmp ssh +ssl"
+
+# Most of the plugins use automagic dependencies, i.e. the plugin will
+# get built if the binary it uses is installed. For example, check_snmp
+# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is
+# installed. End result: most of our runtime dependencies are required
+# at build time as well.
+#
+# REAL_DEPEND contains the dependencies that are actually needed to
+# build. DEPEND contains those plus the automagic dependencies.
+#
+REAL_DEPEND="dev-lang/perl
+ curl? (
+ dev-libs/uriparser
+ net-misc/curl
+ )
+ ldap? ( net-nds/openldap )
+ mysql? ( || ( dev-db/mysql-connector-c dev-db/mariadb-connector-c ) )
+ postgres? ( dev-db/postgresql:= )
+ ssl? (
+ !gnutls? (
+ dev-libs/openssl:0=
+ )
+ gnutls? ( net-libs/gnutls )
+ )
+ radius? ( net-dialup/freeradius-client )"
+
+DEPEND="${REAL_DEPEND}
+ dns? ( net-dns/bind-tools )
+ game? ( games-util/qstat )
+ fping? ( net-analyzer/fping )
+ samba? ( net-fs/samba )
+ ssh? ( net-misc/openssh )
+ snmp? ( dev-perl/Net-SNMP
+ net-analyzer/net-snmp[-minimal] )"
+
+# Basically everything collides with nagios-plugins.
+RDEPEND="${DEPEND}
+ acct-group/nagios
+ acct-user/nagios
+ !net-analyzer/nagios-plugins"
+
+# At least one test is interactive.
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-fix-check-disk-on-btrfs.patch" #830249
+)
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ # Use an array to prevent econf from mangling the ping args.
+ local myconf=()
+
+ if use ssl; then
+ myconf+=( $(use_with !gnutls openssl /usr)
+ $(use_with gnutls gnutls /usr) )
+ else
+ myconf+=( --without-openssl )
+ myconf+=( --without-gnutls )
+ fi
+
+ # The autodetection for these two commands can hang if localhost is
+ # down or ICMP traffic is filtered. Bug #468296.
+ myconf+=( --with-ping-command="/bin/ping -4 -n -U -w %d -c %d %s" )
+
+ if use ipv6; then
+ myconf+=( --with-ping6-command="/bin/ping -6 -n -U -w %d -c %d %s" )
+ fi
+
+ econf \
+ $(use_with curl libcurl) \
+ $(use_with curl uriparser) \
+ $(use_with mysql) \
+ $(use_with ipv6) \
+ $(use_with ldap) \
+ $(use_with postgres pgsql /usr) \
+ $(use_with radius) \
+ "${myconf[@]}" \
+ --libexecdir="/usr/$(get_libdir)/nagios/plugins" \
+ --sysconfdir="/etc/nagios"
+}
+
+DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \
+ NEWS README REQUIREMENTS SUPPORT THANKS )
+
+pkg_postinst() {
+ elog "This ebuild has a number of USE flags that determine what you"
+ elog "are able to monitor. Depending on what you want to monitor, some"
+ elog "or all of these USE flags need to be set."
+ elog
+ elog "The plugins are installed in ${EROOT}/usr/$(get_libdir)/nagios/plugins"
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/monitoring-plugins/, net-analyzer/monitoring-plugins/files/
@ 2023-02-03 19:31 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-02-03 19:31 UTC (permalink / raw
To: gentoo-commits
commit: 79fd5b62c585d3d7b604f0a2592b7a1567b6ccd1
Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Feb 3 19:09:32 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 3 19:31:20 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79fd5b62
net-analyzer/monitoring-plugins: add 2.3.3
Bug: https://bugs.gentoo.org/880211
Closes: https://bugs.gentoo.org/893092
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29408
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-analyzer/monitoring-plugins/Manifest | 1 +
.../files/monitoring-plugins-gnutls.patch | 21 ++++
.../monitoring-plugins-2.3.3.ebuild | 109 +++++++++++++++++++++
3 files changed, 131 insertions(+)
diff --git a/net-analyzer/monitoring-plugins/Manifest b/net-analyzer/monitoring-plugins/Manifest
index e19b4b8e6a60..fdecddd96a18 100644
--- a/net-analyzer/monitoring-plugins/Manifest
+++ b/net-analyzer/monitoring-plugins/Manifest
@@ -1,2 +1,3 @@
DIST monitoring-plugins-2.3.1.tar.gz 2529669 BLAKE2B 8dbbab78c1e57e249024fe57439acb41960585f2cccba20d03ca75a04b87e84752665f49cfe545c6a409d29094077dac0485aef872586f853e2f0f2187bf5070 SHA512 0ae76bc776997ed23d142ad9a688edc4df9b8ec0f9539b446e4fb4849a165cc88e97cbfb3a7a9a450de452e021d38f2e4ada7e8a22d78cf58e17e266472d01d7
DIST monitoring-plugins-2.3.2.tar.gz 2766966 BLAKE2B 1a9c35e8df22d5666005b4b79f5a7ee878c0d4be1e98039f341b198a658747010e8c9d1c0a1818d67a402e5c302ec5eb5073628d52c29caf41dbc2ce57c18f6c SHA512 d155f09ddd99f4e0d065627d3bf8768e13ae3f58ed25912f33b070cd24d6f3f43243616ec3e2d496dec633feee6b1f14950035a928034a1413f725814e850765
+DIST monitoring-plugins-2.3.3.tar.gz 2620192 BLAKE2B 47bd7e71cf470781bb3bd8c8437ebfccdc977e48a3eba1d83ba85c2c1a8c154c7db832e3bb7189bf669083a10069c7fe09c7235a00b35fd9a6d80afcdbb44246 SHA512 502274b47da2ad04d0e2e4e29baa7e5ad8b9a9ece36794dcdf7dfcc087de30e514ff6937eaaa26b93daad329fcd11b72c3c87cad826e6bf6bafffa450077706f
diff --git a/net-analyzer/monitoring-plugins/files/monitoring-plugins-gnutls.patch b/net-analyzer/monitoring-plugins/files/monitoring-plugins-gnutls.patch
new file mode 100644
index 000000000000..00415f0b7111
--- /dev/null
+++ b/net-analyzer/monitoring-plugins/files/monitoring-plugins-gnutls.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/880211
+https://github.com/monitoring-plugins/monitoring-plugins/issues/1834
+https://github.com/monitoring-plugins/monitoring-plugins/commit/31bdbfce92de2dc7717fe13a8d1ca8e7dbf850d4
+
+diff --git a/plugins/sslutils.c b/plugins/sslutils.c
+index 286273f6..c26c4fb3 100644
+--- a/plugins/sslutils.c
++++ b/plugins/sslutils.c
+@@ -134,7 +134,12 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int
+ return STATE_CRITICAL;
+ }
+ if (cert && privkey) {
++#ifdef USE_GNUTLS
++ SSL_CTX_use_certificate_file(c, cert, SSL_FILETYPE_PEM);
++#endif
++#ifdef USE_OPENSSL
+ SSL_CTX_use_certificate_chain_file(c, cert);
++#endif
+ SSL_CTX_use_PrivateKey_file(c, privkey, SSL_FILETYPE_PEM);
+ #ifdef USE_OPENSSL
+ if (!SSL_CTX_check_private_key(c)) {
diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.3.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.3.ebuild
new file mode 100644
index 000000000000..bf2ccb76116a
--- /dev/null
+++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.3.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit flag-o-matic
+
+DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu"
+HOMEPAGE="https://www.monitoring-plugins.org/"
+SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~sparc ~x86"
+IUSE="curl gnutls ipv6 ldap mysql dns fping game postgres radius samba snmp ssh +ssl"
+
+# Most of the plugins use automagic dependencies, i.e. the plugin will
+# get built if the binary it uses is installed. For example, check_snmp
+# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is
+# installed. End result: most of our runtime dependencies are required
+# at build time as well.
+#
+# REAL_DEPEND contains the dependencies that are actually needed to
+# build. DEPEND contains those plus the automagic dependencies.
+#
+REAL_DEPEND="dev-lang/perl
+ curl? (
+ dev-libs/uriparser
+ net-misc/curl
+ )
+ ldap? ( net-nds/openldap:= )
+ mysql? ( || ( dev-db/mysql-connector-c dev-db/mariadb-connector-c ) )
+ postgres? ( dev-db/postgresql:= )
+ ssl? (
+ !gnutls? (
+ dev-libs/openssl:0=
+ )
+ gnutls? ( net-libs/gnutls )
+ )
+ radius? ( net-dialup/freeradius-client )"
+
+DEPEND="${REAL_DEPEND}
+ dns? ( net-dns/bind-tools )
+ game? ( games-util/qstat )
+ fping? ( net-analyzer/fping )
+ samba? ( net-fs/samba )
+ ssh? ( net-misc/openssh )
+ snmp? ( dev-perl/Net-SNMP
+ net-analyzer/net-snmp[-minimal] )"
+
+# Basically everything collides with nagios-plugins.
+RDEPEND="${DEPEND}
+ acct-group/nagios
+ acct-user/nagios
+ !net-analyzer/nagios-plugins"
+
+# At least one test is interactive.
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/monitoring-plugins-gnutls.patch"
+)
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ # Use an array to prevent econf from mangling the ping args.
+ local myconf=()
+
+ if use ssl; then
+ myconf+=( $(use_with !gnutls openssl /usr)
+ $(use_with gnutls gnutls /usr) )
+ else
+ myconf+=( --without-openssl )
+ myconf+=( --without-gnutls )
+ fi
+
+ # The autodetection for these two commands can hang if localhost is
+ # down or ICMP traffic is filtered (bug #468296). But also the path
+ # likes to move around on us (bug #883729).
+ myconf+=( --with-ping-command="$(command -v ping) -4 -n -U -w %d -c %d %s" )
+
+ if use ipv6; then
+ myconf+=( --with-ping6-command="$(command -v ping) -6 -n -U -w %d -c %d %s" )
+ fi
+
+ econf \
+ $(use_with curl libcurl) \
+ $(use_with curl uriparser) \
+ $(use_with mysql) \
+ $(use_with ipv6) \
+ $(use_with ldap) \
+ $(use_with postgres pgsql /usr) \
+ $(use_with radius) \
+ "${myconf[@]}" \
+ --libexecdir="/usr/$(get_libdir)/nagios/plugins" \
+ --sysconfdir="/etc/nagios"
+}
+
+DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \
+ NEWS README REQUIREMENTS SUPPORT THANKS )
+
+pkg_postinst() {
+ elog "This ebuild has a number of USE flags that determine what you"
+ elog "are able to monitor. Depending on what you want to monitor, some"
+ elog "or all of these USE flags need to be set."
+ elog
+ elog "The plugins are installed in ${EROOT}/usr/$(get_libdir)/nagios/plugins"
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/monitoring-plugins/, net-analyzer/monitoring-plugins/files/
@ 2023-02-08 17:17 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-02-08 17:17 UTC (permalink / raw
To: gentoo-commits
commit: 56788861591b9cd77eb629026613e038ea18d8c5
Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Feb 8 11:32:07 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 8 17:15:24 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56788861
net-analyzer/monitoring-plugins: fix check_http segfault
Closes: https://bugs.gentoo.org/893252
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29481
Signed-off-by: Sam James <sam <AT> gentoo.org>
...onitoring-plugins-fix-check-http-segfault.patch | 23 ++++++++++++++++++++++
...3.ebuild => monitoring-plugins-2.3.3-r1.ebuild} | 3 ++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/net-analyzer/monitoring-plugins/files/monitoring-plugins-fix-check-http-segfault.patch b/net-analyzer/monitoring-plugins/files/monitoring-plugins-fix-check-http-segfault.patch
new file mode 100644
index 000000000000..34e539f51e2d
--- /dev/null
+++ b/net-analyzer/monitoring-plugins/files/monitoring-plugins-fix-check-http-segfault.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/893252
+https://github.com/monitoring-plugins/monitoring-plugins/issues/1836
+https://github.com/monitoring-plugins/monitoring-plugins/commit/6d3e44d2d8395076060e9c741e9b173dc5d57b76
+
+diff --git a/plugins/check_http.c b/plugins/check_http.c
+index 5fa310f5d..8dda046ff 100644
+--- a/plugins/check_http.c
++++ b/plugins/check_http.c
+@@ -1462,7 +1462,13 @@ char *unchunk_content(const char *content) {
+ memcpy(result + (overall_size - size_of_chunk), start_of_chunk, size_of_chunk);
+ }
+
+- result[overall_size] = '\0';
++ if (overall_size == 0 && result == NULL) {
++ // We might just have received the end chunk without previous content, so result is never allocated
++ result = calloc(1, sizeof(char));
++ // No error handling here, we can only return NULL anyway
++ } else {
++ result[overall_size] = '\0';
++ }
+ return result;
+ }
+
diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.3.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.3-r1.ebuild
similarity index 96%
rename from net-analyzer/monitoring-plugins/monitoring-plugins-2.3.3.ebuild
rename to net-analyzer/monitoring-plugins/monitoring-plugins-2.3.3-r1.ebuild
index bf2ccb76116a..555d75dae179 100644
--- a/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.3.ebuild
+++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.3-r1.ebuild
@@ -58,7 +58,8 @@ RDEPEND="${DEPEND}
RESTRICT="test"
PATCHES=(
- "${FILESDIR}/monitoring-plugins-gnutls.patch"
+ "${FILESDIR}/${PN}-gnutls.patch" #880211
+ "${FILESDIR}/${PN}-fix-check-http-segfault.patch" #893252
)
src_configure() {
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-08 17:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-27 12:45 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/monitoring-plugins/, net-analyzer/monitoring-plugins/files/ Michael Orlitzky
-- strict thread matches above, loose matches on Subject: below --
2022-02-01 8:17 Joonas Niilola
2023-02-03 19:31 Sam James
2023-02-08 17:17 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox