Nagios 1.2 coredump issue

Jason Martin jhmartin at toger.us
Wed Feb 18 21:01:34 CET 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nagios 1.2 will coredump if it receives a cfg_dir option for a directory 
does not exist. This occurs because it does not return(ERROR) when the 
opendir returns NULL; instead continuing to attempt to readdir from that 
pointer.

I've attached a patch that fixes this.  It is already fixed in 2.0 cvs.

Thanks,
- -Jason Martin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.3 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iD8DBQFAM8Srl2ODWuqVSBMRAhRGAKCGjqzfnTg/4G2m0fEq3SWyu/4WKwCfeePs
fc5hkF8T+9C67V3mdJO5q3k=
=TAIW
-----END PGP SIGNATURE-----
-------------- next part --------------
--- xodtemplate.c	2003-11-22 17:37:22.000000000 -0800
+++ /tmp/xodtemplate.c	2004-02-18 11:58:16.000000000 -0800
@@ -237,7 +237,7 @@
 		temp_buffer[sizeof(temp_buffer)-1]='\x0';
 		write_to_logs_and_console(temp_buffer,NSLOG_CONFIG_ERROR,TRUE);
 #endif
-		result=ERROR;
+		return(ERROR);
 	        }
 
 	/* process all files in the directory... */


More information about the Developers mailing list