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

Patch for --no-ssl segfault, prep for 2.5.1 release

Ethan Galstad 20 лет назад
Родитель
Сommit
07d2b5bf34
8 измененных файлов с 36 добавлено и 24 удалено
  1. 4 0
      Changelog
  2. 2 2
      configure
  3. 2 2
      configure.in
  4. 2 2
      include/common.h
  5. 6 6
      include/dh.h
  6. 1 1
      nrpe.spec
  7. 1 1
      src/check_nrpe.c
  8. 18 10
      src/nrpe.c

+ 4 - 0
Changelog

@@ -2,6 +2,10 @@
 NRPE Changelog
 NRPE Changelog
 **************
 **************
 
 
+2.5.1 - 04/09/2006
+------------------
+- Patch to fix segfault if --no-ssl option is used (Sean Finney/Peter Palfrader)
+
 
 
 2.5 - 04/06/2006
 2.5 - 04/06/2006
 ----------------
 ----------------

+ 2 - 2
configure

@@ -1294,9 +1294,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
 
 PKG_NAME=nrpe
 PKG_NAME=nrpe
-PKG_VERSION="2.5"
+PKG_VERSION="2.5.1"
 PKG_HOME_URL="http://www.nagios.org/"
 PKG_HOME_URL="http://www.nagios.org/"
-PKG_REL_DATE="04-06-2006"
+PKG_REL_DATE="04-09-2006"
 
 
 ac_aux_dir=
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do

+ 2 - 2
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.5"
+PKG_VERSION="2.5.1"
 PKG_HOME_URL="http://www.nagios.org/"
 PKG_HOME_URL="http://www.nagios.org/"
-PKG_REL_DATE="04-06-2006"
+PKG_REL_DATE="04-09-2006"
 
 
 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

+ 2 - 2
include/common.h

@@ -23,8 +23,8 @@
 
 
 #include "config.h"
 #include "config.h"
 
 
-#define PROGRAM_VERSION "2.5"
-#define MODIFICATION_DATE "04-06-2006"
+#define PROGRAM_VERSION "2.5.1"
+#define MODIFICATION_DATE "04-09-2006"
 
 
 #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[]={
-		0xE2,0x44,0x02,0x4F,0x5D,0x56,0x0A,0x7E,0xA9,0x54,0x39,0x9F,
-		0xFA,0x36,0x7A,0x59,0xBD,0x4B,0xC4,0x7E,0xC9,0xF6,0x79,0xA4,
-		0xD7,0x3B,0xAD,0xB7,0xA6,0x8E,0xEA,0xE1,0x4E,0x79,0x09,0x62,
-		0x02,0xD0,0xBD,0xED,0x70,0x13,0xFE,0x29,0x66,0x57,0xFB,0x3A,
-		0x4A,0xF7,0x23,0xFF,0x65,0xE4,0xB0,0x75,0x76,0xD6,0x48,0x15,
-		0x01,0x5F,0xBA,0x63,
+		0xEC,0xC9,0x9D,0xB4,0x77,0x0B,0x31,0xC3,0xEF,0xE7,0xEC,0xEE,
+		0x32,0xA5,0xED,0x4E,0x09,0xD3,0x78,0xDA,0xB2,0x62,0x82,0xA5,
+		0xF9,0xCE,0x6E,0x65,0x23,0x71,0x18,0x9B,0x78,0x41,0x37,0xA1,
+		0x6C,0xCB,0x2F,0xEF,0x2A,0x41,0x21,0x76,0x64,0x55,0xF7,0xFB,
+		0x6B,0xB5,0x98,0xB6,0x10,0x20,0xB8,0x29,0x2C,0xD4,0x4C,0x49,
+		0x58,0xB7,0x21,0x73,
 		};
 		};
 	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.5
+%define version 2.5.1
 %define release 1
 %define release 1
 %define nsusr nagios
 %define nsusr nagios
 %define nsgrp nagios
 %define nsgrp nagios

+ 1 - 1
src/check_nrpe.c

@@ -4,7 +4,7 @@
  * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
  * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
  * License: GPL
  * License: GPL
  *
  *
- * Last Modified: 04-06-2006
+ * Last Modified: 04-09-2006
  *
  *
  * 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]
  *
  *

+ 18 - 10
src/nrpe.c

@@ -4,7 +4,7 @@
  * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
  * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
  * License: GPL
  * License: GPL
  *
  *
- * Last Modified: 04-06-2006
+ * Last Modified: 04-09-2006
  *
  *
  * Command line: nrpe -c <config_file> [--inetd | --daemon]
  * Command line: nrpe -c <config_file> [--inetd | --daemon]
  *
  *
@@ -1015,9 +1015,11 @@ void handle_connection(int sock){
 		syslog(LOG_ERR,"Could not read request from client, bailing out...");
 		syslog(LOG_ERR,"Could not read request from client, bailing out...");
 
 
 #ifdef HAVE_SSL
 #ifdef HAVE_SSL
-		SSL_shutdown(ssl);
-		SSL_free(ssl);
-		syslog(LOG_INFO,"INFO: SSL Socket Shutdown.\n");
+		if(ssl){
+			SSL_shutdown(ssl);
+			SSL_free(ssl);
+			syslog(LOG_INFO,"INFO: SSL Socket Shutdown.\n");
+			}
 #endif
 #endif
 
 
 		return;
 		return;
@@ -1030,8 +1032,10 @@ void handle_connection(int sock){
 		syslog(LOG_ERR,"Data packet from client was too short, bailing out...");
 		syslog(LOG_ERR,"Data packet from client was too short, bailing out...");
 
 
 #ifdef HAVE_SSL
 #ifdef HAVE_SSL
-		SSL_shutdown(ssl);
-		SSL_free(ssl);
+		if(ssl){
+			SSL_shutdown(ssl);
+			SSL_free(ssl);
+			}
 #endif
 #endif
 
 
 		return;
 		return;
@@ -1060,8 +1064,10 @@ void handle_connection(int sock){
 	                }
 	                }
 
 
 #ifdef HAVE_SSL
 #ifdef HAVE_SSL
-		SSL_shutdown(ssl);
-		SSL_free(ssl);
+		if(ssl){
+			SSL_shutdown(ssl);
+			SSL_free(ssl);
+			}
 #endif
 #endif
 
 
 		return;
 		return;
@@ -1184,8 +1190,10 @@ void handle_connection(int sock){
 #endif
 #endif
 
 
 #ifdef HAVE_SSL
 #ifdef HAVE_SSL
-	SSL_shutdown(ssl);
-	SSL_free(ssl);
+	if(ssl){
+		SSL_shutdown(ssl);
+		SSL_free(ssl);
+		}
 #endif
 #endif
 
 
 	/* log info to syslog facility */
 	/* log info to syslog facility */