Nrpe and reiserfs

Ethan Galstad nagios at nagios.org
Thu Apr 6 23:03:07 CEST 2006


Gerhard Lausser wrote:
> Hi Ethan,
> 
> i stumbled over a bug in reiserfs, when i was desperately trying to find out
> why an include_dir= statement in my nrpe.cfg was ignored.
> In the read_config_dir function you wrote:
> 
> #ifdef _DIRENT_HAVE_D_TYPE
>                         /* only process normal files */
>                         if(dirfile->d_type!=DT_REG)
>                                 continue;
> #endif   
> 
> which is completely correct. 
> BUT: 
> - Linux defines _DIRENT_HAVE_D_TYPE 
> - readdir for a reiserfs ALWAYS returns DT_UNKNOWN as d_dtype
> so always the continue statement will be executed and the configfile will be
> ignored.
> I made a patch which uses stat and the S_ISREG and S_ISDIR macros instead of
> d_type, which also should work on systems without _DIRENT_HAVE_D_TYPE.
> 
> Greetings from Munich,
> Gerhard

Thanks! This will be included in NRPE 2.5, which I will be releasing 
shortly...


Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642




More information about the Developers mailing list