[Nagios-devel] Two NRPE bugs (and patches)
-
Guest
[Nagios-devel] Two NRPE bugs (and patches)
--Apple-Mail-12-997696331
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
Sorry for the delay in writing back, things have ben quite busy.
As I said before, I made some minor changes to the NRPE source to
address two bugs that I found.
1) If openssl installed but in a non-standard location, configuring
and making nrpe would fail generating DH parameters because the
openssl binary could not be found. I added the configure time option
--with-ssl for setting the install path of openssl. Also, as far as I
can tell with-ssl-lib is never used, so I removed it. Finally, I
beefed up the logic that it used to find both the include files and
the openssl binary so that they are more likely to succeed if you
have a non-standard installation.
2) Fixed a bug that caused NRPE to stop parsing the config file after
a non-fatal error. This happened when an invalid config_dir was
specified after sufficient configuration options were parsed. For
example, I had all of the core options (port, user, group.... etc) at
the top of my config, then an include_dir that specified a directory
that did not exist and then all of the command definitions. The
daemon would launch, report only that the config dir was not found
yet it would have no checks available and report no other errors
(because the checks were defined after the invalid include_dir).
I enabled some additional error output and allowed read_config_file()
to keep going (with warnings) even if a non-existent include_dir or
include_file are specified.
Feedback welcome.
-Andrew
--Apple-Mail-12-997696331
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0666;
name=abl.patch
Content-Disposition: attachment;
filename=abl.patch
--- nrpe-2.6.orig/src/nrpe.c 2006-12-11 21:04:00.000000000 -0500
+++ nrpe-2.6/src/nrpe.c 2007-02-01 23:43:05.000000000 -0500
@@ -413,15 +413,15 @@
/* process the config directory... */
if(read_config_dir(config_file)==ERROR)
- break;
- }
+ syslog(LOG_ERR,"Continuing with errors...");
+ }
/* allow users to specify individual config files to include */
else if(!strcmp(varname,"include") || !strcmp(varname,"include_file")){
/* process the config file... */
if(read_config_file(varvalue)==ERROR)
- break;
+ syslog(LOG_ERR,"Continuing with errors...");
}
else if(!strcmp(varname,"server_port")){
--- nrpe-2.6.orig/configure.in 2006-12-11 21:03:59.000000000 -0500
+++ nrpe-2.6/configure.in 2007-02-02 00:21:17.000000000 -0500
@@ -168,10 +168,9 @@
],check_for_ssl=yes)
dnl Optional SSL library and include paths
-ssl_lib_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,[
ssl_inc_dir=$withval
@@ -185,16 +184,28 @@
if test x$check_for_ssl = xyes; then
AC_MSG_CHECKING(for SSL)
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"
if test -f "$dir/include/openssl/ssl.h"; then
found_ssl=yes
- CFLAGS="$CFLAGS -I$ssldir/include/openssl -I$ssldir/include"
+ CFLAGS="$CFLAGS -I$dir/include/openssl -I$ssldir/include"
break
fi
if test -f "$dir/include/ssl.h"; then
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
fi
done
--Apple-Mail-12-997696331
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
On Jan 29, 2007, at 1:57 PM,
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]