[Fwd: patch: nrpe fails to start when config file includes whitespace-only line]

Simon Kitching simon at ecnetwork.co.nz
Thu Mar 11 05:46:41 CET 2004


Note: repost, as the original has not appeared after 6 days.

-----Forwarded Message-----
> From: Simon Kitching <simon at ecnetwork.co.nz>
> To: nagios-devel at lists.sourceforge.net
> Subject: [Nagios-devel] patch: nrpe fails to start when config file includes whitespace-only line
> Date: Fri, 05 Mar 2004 17:02:33 +1300
> 
> Hi,
> 
> If nrpe's config file should include a line containing only whitespace,
> then it will fail to start. I found this rather tricky to diagnose!
> 
> To demonstrate bug:
>   nrpe -d -c {config-file}
> then
>   ps -efl | grep nrpe
> 
> For a config file containing "  \n", nrpe will fail to start.
> 
> So attached is a simple patch to ignore all whitespace on the start of
> any line in the config file. Note that this means that "  x=foo" and " 
> # a comment" will now be regarded as valid rather than invalid as was
> previously done (leading whitespace is just ignored).
> 
> The patch is in conventional "universal diff" format.

And that should of course be "unified diff". 

Regards,

Simon



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click




More information about the Developers mailing list