Re: [Nagios-devel] Bugfix for skipping non-cfg files in "cfg_dir"

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

Re: [Nagios-devel] Bugfix for skipping non-cfg files in "cfg_dir"

Post by Guest »

Thanks! Patch will be in CVS shortly.

On 8 Oct 2005 at 3:57, Holger Weiss wrote:

> We have RCS files within (subdirectories of) the Nagios configuration
> directories. Since these files don't have a ".cfg" suffix, they should
> be ignored by Nagios. However, Nagios _sometimes_ treats these files as
> if they were directories and bails out because it can't opendir() them.
> This happens because
>
> 1) only the file name but not the full path is passed to the stat() call
> which is done for checking the type of a non-cfg file[1], and then
> 2) the return value of this stat() call is interpreted the wrong way
> round: "!=0" is treated as "success" and therefore "stat_buf" will be
> read. This is also done for an earlier stat() call[2] (which is not
> related to this bug though).
>
> The attached patch fixes these problems.
>
> Holger
>
> [1] xdata/xodtemplate.c:422
> [2] xdata/xodtemplate.c:399
>
> --
> PGP fingerprint: F1F0 9071 8084 A426 DD59 9839 59D3 F3A1 B8B5 D3DE
>



Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org






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