cfg_dir and hidden directories

Holger Weiss holger at CIS.FU-Berlin.DE
Wed Apr 19 15:18:36 CEST 2006


* Mark Plaksin <happy at usg.edu> [2006-04-19 07:53]:
> a change between 2.0b4 and 2.1 is causing Nagios' cfg_dir processing to
> recurse into hidden directories.  It *looks* like the problem is in the
> diff between version 1.99 and version 1.100 of xdata/xodtemplate.c but I
> can't put my finger on the exact cause.

Are you _sure_ you see the duplicate definitions due to Nagios recursing
into hidden subdirectories?  I cannot reproduce this with Nagios 2.1/2.2
and from reading the code, I don't see how the check for hidden
directories in xdata/xodtemplate.c:430 could fail.

If you're running Nagios on Linux, could you check the output of "strace
nagios -v /path/to/nagios.cfg" and see whether Nagios really open(2)s a
file within a hidden directory?

> If I build 2.1 with version 1.99 of xodtemplate.c the problem is gone.

The fact that it "works" with this revision of xodtemplate.c doesn't
properly isolate the problem, as the handling of "non-*.cfg" files and
directories within a cfg_dir is somewhat undefined with rev. 1.99[*].

Holger

[*] http://thread.gmane.org/gmane.network.nagios.devel/2172

-- 
PGP fingerprint:  F1F0 9071 8084 A426 DD59  9839 59D3 F3A1 B8B5 D3DE


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Developers mailing list