[Nagios-devel] nrpe-2.5.1 (nrpe-2.4+) and SSL errors

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] nrpe-2.5.1 (nrpe-2.4+) and SSL errors

Post by Guest »

This is a multi-part message in MIME format.

------=_NextPart_000_031F_01C65CBB.36360EF0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi Ethan,

i saw that since nrpe-2.4 the call to read_config_file was moved at two
places coming after the ssl initialization code. You remember my patch
introducing the allow_weak_random_seed option? I just compiled nrpe-2.5.1 on
a hp-ux 11.00 server which, according to it's patchlevel has no /dev/*random
and therefore needs this option to successfully complete the ssl handshake.
The problem is, at the time of the ssl initialization,
allow_weak_random_seed is still 0, because the config file has not been read
in yet. Is there a reason, why the config file is opened now later? Of not,
i beg you to apply my patch, which moves config file reading back to the
beginning.

Greetings from Munich,
Gerhard

------=_NextPart_000_031F_01C65CBB.36360EF0
Content-Type: application/octet-stream;
name="nrpe-2.5.1.first.readconfig.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="nrpe-2.5.1.first.readconfig.patch"

diff -Naur nrpe-2.5.1/src/nrpe.c nrpe-2.5.1.first.readconfig/src/nrpe.c=0A=
--- nrpe-2.5.1/src/nrpe.c 2006-04-10 03:42:30.000000000 +0200=0A=
+++ nrpe-2.5.1.first.readconfig/src/nrpe.c 2006-04-10 16:03:59.768625700 =
+0200=0A=
@@ -175,6 +175,15 @@=0A=
config_file[sizeof(config_file)-1]=3D'\x0';=0A=
}=0A=
=0A=
+ /* read the config file */=0A=
+ result=3Dread_config_file(config_file); =0A=
+=0A=
+ /* exit if there are errors... */=0A=
+ if(result=3D=3DERROR){=0A=
+ syslog(LOG_ERR,"Config file '%s' contained errors, bailing =
out...",config_file);=0A=
+ return STATE_CRITICAL;=0A=
+ }=0A=
+=0A=
/* generate the CRC 32 table */=0A=
generate_crc32_table();=0A=
=0A=
@@ -235,15 +244,6 @@=0A=
/* if we're running under inetd... */=0A=
if(use_inetd=3D=3DTRUE){=0A=
=0A=
- /* read the config file */=0A=
- result=3Dread_config_file(config_file); =0A=
-=0A=
- /* exit if there are errors... */=0A=
- if(result=3D=3DERROR){=0A=
- syslog(LOG_ERR,"Config file '%s' contained errors, bailing =
out...",config_file);=0A=
- return STATE_CRITICAL;=0A=
- }=0A=
-=0A=
/* make sure we're not root */=0A=
check_privileges();=0A=
=0A=
@@ -282,15 +282,6 @@=0A=
/* log info to syslog facility */=0A=
syslog(LOG_NOTICE,"Starting up daemon");=0A=
=0A=
- /* read the config file */=0A=
- result=3Dread_config_file(config_file); =0A=
-=0A=
- /* exit if there are errors... */=0A=
- if(result=3D=3DERROR){=0A=
- syslog(LOG_ERR,"Config file '%s' contained errors, bailing =
out...",config_file);=0A=
- return STATE_CRITICAL;=0A=
- }=0A=
-=0A=
/* write pid file */=0A=
if(write_pid_file()=3D=3DERROR)=0A=
return STATE_CRITICAL;=0A=

------=_NextPart_000_031F_01C65CBB.36360EF0--






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked