From: "Tobias Scherbaum (dertobi123)" <dertobi123@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/nagios-plugins/files: nagios-plugins-1.4.13-mysqlpass-917fcc7.patch nagios-plugins-1.4.13-upslogout.patch
Date: Sat, 30 May 2009 07:58:26 +0000 [thread overview]
Message-ID: <E1MAJSU-0003I8-98@stork.gentoo.org> (raw)
dertobi123 09/05/30 07:58:26
Added: nagios-plugins-1.4.13-mysqlpass-917fcc7.patch
nagios-plugins-1.4.13-upslogout.patch
Log:
Revbump, fix #243384 and #253893
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Revision Changes Path
1.1 net-analyzer/nagios-plugins/files/nagios-plugins-1.4.13-mysqlpass-917fcc7.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.13-mysqlpass-917fcc7.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.13-mysqlpass-917fcc7.patch?rev=1.1&content-type=text/plain
Index: nagios-plugins-1.4.13-mysqlpass-917fcc7.patch
===================================================================
From: Thomas Guyot-Sionnest <dermoth@aei.ca>
Date: Wed, 20 May 2009 04:20:11 +0000 (-0400)
Subject: Fix check_mysql* not using password set in my.cnf (#2531905 - Ben Timby)
X-Git-Url: http://repo.or.cz/w/nagiosplugins.git?a=commitdiff_plain;h=917fcc7c302f67b42482a1a3e16e62f3b39d4e80
Fix check_mysql* not using password set in my.cnf (#2531905 - Ben Timby)
---
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 689648e..05d2b01 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -5,7 +5,7 @@
* License: GPL
* Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)
* Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net)
-* Copyright (c) 1999-2007 Nagios Plugins Development Team
+* Copyright (c) 1999-2009 Nagios Plugins Development Team
*
* Description:
*
@@ -358,9 +358,6 @@ validate_arguments (void)
if (db_host == NULL)
db_host = strdup("");
- if (db_pass == NULL)
- db_pass = strdup("");
-
if (db == NULL)
db = strdup("");
@@ -417,6 +414,9 @@ print_help (void)
printf ("\n");
printf ("%s\n", _("Notes:"));
printf (_(UT_EXTRA_OPTS_NOTES));
+ printf ("\n");
+ printf (" %s\n", _("You must specify -p with an empty string to force an empty password,"));
+ printf (" %s\n", _("overriding any my.cnf settings."));
#endif
printf (_(UT_SUPPORT));
diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c
index 802e345..47dd861 100644
--- a/plugins/check_mysql_query.c
+++ b/plugins/check_mysql_query.c
@@ -3,7 +3,7 @@
* Nagios check_mysql_query plugin
*
* License: GPL
-* Copyright (c) 2006-2007 Nagios Plugins Development Team
+* Copyright (c) 2006-2009 Nagios Plugins Development Team
* Original code from check_mysql, copyright 1999 Didi Rieder
*
* Description:
@@ -266,9 +266,6 @@ validate_arguments (void)
if (db_host == NULL)
db_host = strdup("");
- if (db_pass == NULL)
- db_pass = strdup("");
-
if (db == NULL)
db = strdup("");
@@ -317,6 +314,9 @@ print_help (void)
printf ("\n");
printf ("%s\n", _("Notes:"));
printf (_(UT_EXTRA_OPTS_NOTES));
+ printf ("\n");
+ printf (" %s\n", _("You must specify -p with an empty string to force an empty password,"));
+ printf (" %s\n", _("overriding any my.cnf settings."));
#endif
printf (_(UT_SUPPORT));
1.1 net-analyzer/nagios-plugins/files/nagios-plugins-1.4.13-upslogout.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.13-upslogout.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.13-upslogout.patch?rev=1.1&content-type=text/plain
Index: nagios-plugins-1.4.13-upslogout.patch
===================================================================
diff --git a/plugins/check_ups.c b/plugins/check_ups.c
index 154508d..bbd963a 100644
--- a/plugins/check_ups.c
+++ b/plugins/check_ups.c
@@ -398,12 +398,15 @@ get_ups_variable (const char *varname, char *buf, size_t buflen)
char temp_buffer[MAX_INPUT_BUFFER];
char send_buffer[MAX_INPUT_BUFFER];
char *ptr;
+ char *logout = "OK Goodbye\n";
+ int logout_len = strlen(logout);
int len;
*buf=0;
/* create the command string to send to the UPS daemon */
- sprintf (send_buffer, "GET VAR %s %s\n", ups_name, varname);
+ /* Add LOGOUT to avoid read failure logs */
+ sprintf (send_buffer, "GET VAR %s %s\nLOGOUT\n", ups_name, varname);
/* send the command to the daemon and get a response back */
if (process_tcp_request
@@ -415,6 +418,7 @@ get_ups_variable (const char *varname, char *buf, size_t buflen)
ptr = temp_buffer;
len = strlen(ptr);
+ if (len > logout_len && strcmp (ptr + len - logout_len, logout) == 0) len -= logout_len;
if (len > 0 && ptr[len-1] == '\n') ptr[len-1]=0;
if (strcmp (ptr, "ERR UNKNOWN-UPS") == 0) {
printf (_("CRITICAL - no such ups '%s' on that host\n"), ups_name);
reply other threads:[~2009-05-30 7:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1MAJSU-0003I8-98@stork.gentoo.org \
--to=dertobi123@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox