SF.net SVN: nagiosplug:[2195] nagiosplug/trunk

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
Revision: 2195
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2195&view=rev
Author:   dermoth
Date:     2009-05-20 04:21:16 +0000 (Wed, 20 May 2009)

Log Message:
-----------
Fix check_mysql* not using password set in my.cnf (#2531905 - Ben Timby)

From: Thomas Guyot-Sionnest <[email protected]>

Modified Paths:
--------------
    nagiosplug/trunk/NEWS
    nagiosplug/trunk/THANKS.in
    nagiosplug/trunk/plugins/check_mysql.c
    nagiosplug/trunk/plugins/check_mysql_query.c

Modified: nagiosplug/trunk/NEWS
===================================================================
--- nagiosplug/trunk/NEWS	2009-05-19 22:43:01 UTC (rev 2194)
+++ nagiosplug/trunk/NEWS	2009-05-20 04:21:16 UTC (rev 2195)
@@ -32,6 +32,7 @@
 	Fixed segfault in check_mysql with old slaves (#2696823 - Oskar Ahner)
 	check_nt can return UNKNOWN on timeouts (-u)
 	Fixed typos for check_disk (Chris Pepper)
+	Fixed check_mysql* not using password set in my.cnf (#2531905 - Ben Timby) - Specify an empty password explicitly if you need to override it.
 
 1.4.13 25th Sept 2008
 	Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)

Modified: nagiosplug/trunk/THANKS.in
===================================================================
--- nagiosplug/trunk/THANKS.in	2009-05-19 22:43:01 UTC (rev 2194)
+++ nagiosplug/trunk/THANKS.in	2009-05-20 04:21:16 UTC (rev 2195)
@@ -250,3 +250,4 @@
 John Barbuto
 Oskar Ahner
 Chris Pepper
+Ben Timby

Modified: nagiosplug/trunk/plugins/check_mysql.c
===================================================================
--- nagiosplug/trunk/plugins/check_mysql.c	2009-05-19 22:43:01 UTC (rev 2194)
+++ nagiosplug/trunk/plugins/check_mysql.c	2009-05-20 04:21:16 UTC (rev 2195)
@@ -5,7 +5,7 @@
 * License: GPL
 * Copyright (c) 1999 Didi Rieder ([email protected])
 * Copyright (c) 2000 Karl DeBisschop ([email protected])
-* Copyright (c) 1999-2007 Nagios Plugins Development Team
+* Copyright (c) 1999-2009 Nagios Plugins Development Team
 * 
 * Description:
 * 
@@ -358,9 +358,6 @@
 	if (db_host == NULL)
 		db_host = strdup("");
 
-	if (db_pass == NULL)
-		db_pass = strdup("");
-
 	if (db == NULL)
 		db = strdup("");
 
@@ -417,6 +414,9 @@
 	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));

Modified: nagiosplug/trunk/plugins/check_mysql_query.c
===================================================================
--- nagiosplug/trunk/plugins/check_mysql_query.c	2009-05-19 22:43:01 UTC (rev 2194)
+++ nagiosplug/trunk/plugins/check_mysql_query.c	2009-05-20 04:21:16 UTC (rev 2195)
@@ -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 @@
 	if (db_host == NULL)
 		db_host = strdup("");
 
-	if (db_pass == NULL)
-		db_pass = strdup("");
-
 	if (db == NULL)
 		db = strdup("");
 
@@ -317,6 +314,9 @@
 	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));


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.