Sfoglia il codice sorgente

Bug fixes, prep for new release

Ethan Galstad 19 anni fa
parent
commit
4cba77d9ba
9 ha cambiato i file con 69 aggiunte e 41 eliminazioni
  1. 7 1
      Changelog
  2. 22 11
      configure
  3. 19 8
      configure.in
  4. 3 3
      include/common.h
  5. 6 6
      include/dh.h
  6. 1 1
      nrpe.spec
  7. 3 3
      src/check_nrpe.c
  8. 6 6
      src/nrpe.c
  9. 2 2
      update-version

+ 7 - 1
Changelog

@@ -2,8 +2,14 @@
 NRPE Changelog
 NRPE Changelog
 **************
 **************
 
 
+2.7 - 02/18/2007
+----------------
+- Patches for detection SSL header and library locations (Andrew Boyce-Lewis)
+- NRPE daemon will now partially ignore non-fatal configuration file errors and attempt to startup (Andrew Boyce-Lewis)
+
+
 2.6 - 12/11/2006
 2.6 - 12/11/2006
-------------------
+----------------
 - Added -u option to check_nrpe to return UNKNOWN states on socket timeouts (Bjoern Beutel)
 - Added -u option to check_nrpe to return UNKNOWN states on socket timeouts (Bjoern Beutel)
 - Added connection_timeout variable to NRPE daemon to catch dead client connections (Ton Voon)
 - Added connection_timeout variable to NRPE daemon to catch dead client connections (Ton Voon)
 - Added graceful timeout to check_nrpe to ensure connection to NRPE daemon is properly closed (Mark Plaksin)
 - Added graceful timeout to check_nrpe to ensure connection to NRPE daemon is properly closed (Mark Plaksin)

+ 22 - 11
configure

@@ -851,7 +851,7 @@ Optional Features:
 Optional Packages:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
---with-ssl-lib=DIR sets location of the SSL library
+--with-ssl=DIR sets location of the SSL installation
 --with-ssl-inc=DIR sets location of the SSL include files
 --with-ssl-inc=DIR sets location of the SSL include files
 --with-kerberos-inc=DIR sets location of the Kerberos include files
 --with-kerberos-inc=DIR sets location of the Kerberos include files
 --with-nrpe-user=<user> sets user name to run NRPE
 --with-nrpe-user=<user> sets user name to run NRPE
@@ -1294,9 +1294,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
 
 PKG_NAME=nrpe
 PKG_NAME=nrpe
-PKG_VERSION="2.6"
+PKG_VERSION="2.7"
 PKG_HOME_URL="http://www.nagios.org/"
 PKG_HOME_URL="http://www.nagios.org/"
-PKG_REL_DATE="12-11-2006"
+PKG_REL_DATE="02-19-2007"
 
 
 ac_aux_dir=
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@@ -5995,14 +5995,13 @@ else
   check_for_ssl=yes
   check_for_ssl=yes
 fi;
 fi;
 
 
-ssl_lib_dir=
 ssl_inc_dir=
 ssl_inc_dir=
 
 
-# Check whether --with-ssl-lib or --without-ssl-lib was given.
-if test "${with_ssl_lib+set}" = set; then
-  withval="$with_ssl_lib"
+# Check whether --with-ssl or --without-ssl was given.
+if test "${with_ssl+set}" = set; then
+  withval="$with_ssl"
 
 
-	ssl_lib_dir=$withval
+	ssl_dir=$withval
 
 
 fi;
 fi;
 
 
@@ -6026,16 +6025,28 @@ if test x$check_for_ssl = xyes; then
 	echo "$as_me:$LINENO: checking for SSL" >&5
 	echo "$as_me:$LINENO: checking for SSL" >&5
 echo $ECHO_N "checking for SSL... $ECHO_C" >&6
 echo $ECHO_N "checking for SSL... $ECHO_C" >&6
 	found_ssl=no
 	found_ssl=no
-	for dir in $ssl_inc_dir /usr/local/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr /usr/freeware/lib/openssl; do
+	for dir in $ssl_inc_dir $ssl_dir /usr/local/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr /usr/freeware/lib/openssl; do
 		ssldir="$dir"
 		ssldir="$dir"
 		if test -f "$dir/include/openssl/ssl.h"; then
 		if test -f "$dir/include/openssl/ssl.h"; then
 			found_ssl=yes
 			found_ssl=yes
-			CFLAGS="$CFLAGS -I$ssldir/include/openssl -I$ssldir/include"
+			CFLAGS="$CFLAGS -I$dir/include/openssl -I$ssldir/include"
 		        break
 		        break
 		fi
 		fi
 		if test -f "$dir/include/ssl.h"; then
 		if test -f "$dir/include/ssl.h"; then
 			found_ssl=yes
 			found_ssl=yes
-			CFLAGS="$CFLAGS -I$ssldir/include"
+			CFLAGS="$CFLAGS -I$dir/include"
+		        break
+		fi
+		if test -f "$dir/ssl.h"; then
+			found_ssl=yes
+			CFLAGS="$CFLAGS -I$dir/include"
+			ssldir="$dir/.."
+		        break
+		fi
+		if test -f "$dir/openssl/ssl.h"; then
+			found_ssl=yes
+			CFLAGS="$CFLAGS -I$dir/include"
+			ssldir="$dir/.."
 		        break
 		        break
 		fi
 		fi
 	done
 	done

+ 19 - 8
configure.in

@@ -9,9 +9,9 @@ AC_CONFIG_HEADER(include/config.h)
 AC_PREFIX_DEFAULT(/usr/local/nagios)
 AC_PREFIX_DEFAULT(/usr/local/nagios)
 
 
 PKG_NAME=nrpe
 PKG_NAME=nrpe
-PKG_VERSION="2.6"
+PKG_VERSION="2.7"
 PKG_HOME_URL="http://www.nagios.org/"
 PKG_HOME_URL="http://www.nagios.org/"
-PKG_REL_DATE="12-11-2006"
+PKG_REL_DATE="02-19-2007"
 
 
 dnl Figure out how to invoke "install" and what install options to use.
 dnl Figure out how to invoke "install" and what install options to use.
 AC_PROG_INSTALL
 AC_PROG_INSTALL
@@ -168,10 +168,9 @@ AC_ARG_ENABLE(ssl,--enable-ssl enables native SSL support,[
 	],check_for_ssl=yes)
 	],check_for_ssl=yes)
 
 
 dnl Optional SSL library and include paths
 dnl Optional SSL library and include paths
-ssl_lib_dir=
 ssl_inc_dir=
 ssl_inc_dir=
-AC_ARG_WITH(ssl-lib,--with-ssl-lib=DIR sets location of the SSL library,[
-	ssl_lib_dir=$withval
+AC_ARG_WITH(ssl,--with-ssl=DIR sets location of the SSL installation,[
+	ssl_dir=$withval
 	])
 	])
 AC_ARG_WITH(ssl-inc,--with-ssl-inc=DIR sets location of the SSL include files,[
 AC_ARG_WITH(ssl-inc,--with-ssl-inc=DIR sets location of the SSL include files,[
 	ssl_inc_dir=$withval
 	ssl_inc_dir=$withval
@@ -185,16 +184,28 @@ dnl Modified version of Mark Ethan Trostler's macro <trostler@juniper.net>
 if test x$check_for_ssl = xyes; then
 if test x$check_for_ssl = xyes; then
 	AC_MSG_CHECKING(for SSL)
 	AC_MSG_CHECKING(for SSL)
 	found_ssl=no
 	found_ssl=no
-	for dir in $ssl_inc_dir /usr/local/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr /usr/freeware/lib/openssl; do
+	for dir in $ssl_inc_dir $ssl_dir /usr/local/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr /usr/freeware/lib/openssl; do
 		ssldir="$dir"
 		ssldir="$dir"
 		if test -f "$dir/include/openssl/ssl.h"; then
 		if test -f "$dir/include/openssl/ssl.h"; then
 			found_ssl=yes
 			found_ssl=yes
-			CFLAGS="$CFLAGS -I$ssldir/include/openssl -I$ssldir/include"
+			CFLAGS="$CFLAGS -I$dir/include/openssl -I$ssldir/include"
 		        break
 		        break
 		fi
 		fi
 		if test -f "$dir/include/ssl.h"; then
 		if test -f "$dir/include/ssl.h"; then
 			found_ssl=yes
 			found_ssl=yes
-			CFLAGS="$CFLAGS -I$ssldir/include"
+			CFLAGS="$CFLAGS -I$dir/include"
+		        break
+		fi
+		if test -f "$dir/ssl.h"; then
+			found_ssl=yes
+			CFLAGS="$CFLAGS -I$dir/include"
+			ssldir="$dir/.."
+		        break
+		fi
+		if test -f "$dir/openssl/ssl.h"; then
+			found_ssl=yes
+			CFLAGS="$CFLAGS -I$dir/include"
+			ssldir="$dir/.."
 		        break
 		        break
 		fi
 		fi
 	done
 	done

+ 3 - 3
include/common.h

@@ -2,7 +2,7 @@
  *
  *
  * COMMON.H - NRPE Common Include File
  * COMMON.H - NRPE Common Include File
  * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
  * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 12-11-2006
+ * Last Modified: 02-19-2007
  *
  *
  * License:
  * License:
  *
  *
@@ -23,8 +23,8 @@
 
 
 #include "config.h"
 #include "config.h"
 
 
-#define PROGRAM_VERSION "2.6"
-#define MODIFICATION_DATE "12-11-2006"
+#define PROGRAM_VERSION "2.7"
+#define MODIFICATION_DATE "02-19-2007"
 
 
 #define OK		0
 #define OK		0
 #define ERROR		-1
 #define ERROR		-1

+ 6 - 6
include/dh.h

@@ -4,12 +4,12 @@
 DH *get_dh512()
 DH *get_dh512()
 	{
 	{
 	static unsigned char dh512_p[]={
 	static unsigned char dh512_p[]={
-		0xF7,0xA2,0x46,0xB0,0x6F,0x77,0xC4,0xD1,0x98,0x62,0xBD,0x55,
-		0x3F,0x6C,0x49,0x9E,0x0B,0x2D,0xDE,0xA3,0x51,0x36,0xA5,0xBF,
-		0xF8,0x1C,0xC1,0xD3,0xA1,0xD8,0x69,0x06,0xB1,0x21,0x87,0xF2,
-		0x9E,0x74,0x30,0x4E,0x56,0x09,0x8C,0x4F,0xD3,0x9A,0xDA,0xB8,
-		0x37,0x72,0xA0,0x71,0x69,0x52,0x33,0x62,0x16,0xC3,0xE6,0xA0,
-		0x8A,0x98,0xEF,0xFB,
+		0xB9,0xBD,0x35,0x0C,0xD1,0xE9,0x25,0x3F,0x88,0x0E,0x29,0x73,
+		0x6D,0x08,0xDB,0x75,0x5B,0x7A,0x43,0x2D,0x2A,0x73,0x55,0x94,
+		0xA2,0xC0,0x90,0xB5,0xE5,0x0D,0xB1,0x62,0x95,0x32,0xA7,0x6E,
+		0xC8,0x75,0x1E,0x30,0x0E,0x70,0xC3,0x5D,0x99,0xF9,0x6A,0xA5,
+		0xC2,0x0C,0x26,0xD5,0xC3,0x14,0x71,0x12,0x6E,0x7D,0x91,0x86,
+		0xED,0x73,0x29,0x63,
 		};
 		};
 	static unsigned char dh512_g[]={
 	static unsigned char dh512_g[]={
 		0x02,
 		0x02,

+ 1 - 1
nrpe.spec

@@ -1,5 +1,5 @@
 %define name nrpe
 %define name nrpe
-%define version 2.6
+%define version 2.7
 %define release 1
 %define release 1
 %define nsusr nagios
 %define nsusr nagios
 %define nsgrp nagios
 %define nsgrp nagios

+ 3 - 3
src/check_nrpe.c

@@ -1,10 +1,10 @@
 /********************************************************************************************
 /********************************************************************************************
  *
  *
  * CHECK_NRPE.C - NRPE Plugin For Nagios
  * CHECK_NRPE.C - NRPE Plugin For Nagios
- * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
+ * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
  * License: GPL
  * License: GPL
  *
  *
- * Last Modified: 12-11-2006
+ * Last Modified: 02-19-2007
  *
  *
  * Command line: CHECK_NRPE -H <host_address> [-p port] [-c command] [-to to_sec]
  * Command line: CHECK_NRPE -H <host_address> [-p port] [-c command] [-to to_sec]
  *
  *
@@ -72,7 +72,7 @@ int main(int argc, char **argv){
 			printf("Incorrect command line arguments supplied\n");
 			printf("Incorrect command line arguments supplied\n");
                 printf("\n");
                 printf("\n");
 		printf("NRPE Plugin for Nagios\n");
 		printf("NRPE Plugin for Nagios\n");
-		printf("Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)\n");
+		printf("Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)\n");
 		printf("Version: %s\n",PROGRAM_VERSION);
 		printf("Version: %s\n",PROGRAM_VERSION);
 		printf("Last Modified: %s\n",MODIFICATION_DATE);
 		printf("Last Modified: %s\n",MODIFICATION_DATE);
 		printf("License: GPL v2 with exemptions (-l for more info)\n");
 		printf("License: GPL v2 with exemptions (-l for more info)\n");

+ 6 - 6
src/nrpe.c

@@ -1,10 +1,10 @@
 /*******************************************************************************
 /*******************************************************************************
  *
  *
  * NRPE.C - Nagios Remote Plugin Executor
  * NRPE.C - Nagios Remote Plugin Executor
- * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
+ * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
  * License: GPL
  * License: GPL
  *
  *
- * Last Modified: 12-11-2006
+ * Last Modified: 02-19-2007
  *
  *
  * Command line: nrpe -c <config_file> [--inetd | --daemon]
  * Command line: nrpe -c <config_file> [--inetd | --daemon]
  *
  *
@@ -97,7 +97,7 @@ int main(int argc, char **argv){
 
 
 		printf("\n");
 		printf("\n");
 		printf("NRPE - Nagios Remote Plugin Executor\n");
 		printf("NRPE - Nagios Remote Plugin Executor\n");
-		printf("Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)\n");
+		printf("Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)\n");
 		printf("Version: %s\n",PROGRAM_VERSION);
 		printf("Version: %s\n",PROGRAM_VERSION);
 		printf("Last Modified: %s\n",MODIFICATION_DATE);
 		printf("Last Modified: %s\n",MODIFICATION_DATE);
 		printf("License: GPL v2 with exemptions (-l for more info)\n");
 		printf("License: GPL v2 with exemptions (-l for more info)\n");
@@ -413,15 +413,15 @@ int read_config_file(char *filename){
 
 
 			/* process the config directory... */
 			/* process the config directory... */
 			if(read_config_dir(config_file)==ERROR)
 			if(read_config_dir(config_file)==ERROR)
-				break;
-		        }
+				syslog(LOG_ERR,"Continuing with errors...");
+			}
 
 
 		/* allow users to specify individual config files to include */
 		/* allow users to specify individual config files to include */
 		else if(!strcmp(varname,"include") || !strcmp(varname,"include_file")){
 		else if(!strcmp(varname,"include") || !strcmp(varname,"include_file")){
 
 
 			/* process the config file... */
 			/* process the config file... */
 			if(read_config_file(varvalue)==ERROR)
 			if(read_config_file(varvalue)==ERROR)
-				break;
+				syslog(LOG_ERR,"Continuing with errors...");
 		        }
 		        }
 
 
 		else if(!strcmp(varname,"server_port")){
 		else if(!strcmp(varname,"server_port")){

+ 2 - 2
update-version

@@ -10,10 +10,10 @@ else
 fi
 fi
 
 
 # Current version number
 # Current version number
-CURRENTVERSION=2.6
+CURRENTVERSION=2.7
 
 
 # Last date
 # Last date
-LASTDATE=12-11-2006
+LASTDATE=02-19-2007
 
 
 if [ "x$1" = "x" ]
 if [ "x$1" = "x" ]
 then
 then