Просмотр исходного кода

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

Thomas Guyot-Sionnest 16 лет назад
Родитель
Сommit
917fcc7c30
4 измененных файлов с 10 добавлено и 8 удалено
  1. 1 0
      NEWS
  2. 1 0
      THANKS.in
  3. 4 4
      plugins/check_mysql.c
  4. 4 4
      plugins/check_mysql_query.c

+ 1 - 0
NEWS

@@ -32,6 +32,7 @@ This file documents the major additions and syntax changes between releases.
 	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)

+ 1 - 0
THANKS.in

@@ -250,3 +250,4 @@ Richard Edward Horner
 John Barbuto
 Oskar Ahner
 Chris Pepper
+Ben Timby

+ 4 - 4
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));

+ 4 - 4
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));