Re: [Nagios-devel] coredumps
Posted: Wed Dec 05, 2007 12:50 am
Andrew Ivanov wrote:
> Hi everybody,
>
> Playing with coredumps, I've found that nagios gets homedir not from passwd
> entry, but from $HOME env variable.
> With this patch, Nagios will determine homedir of nagios user via
> getpwnam(3) call, and fallback to $HOME if failed.
>
> It would be great to see this patch (based on last CVS snapshot) in the
> official source tree.
> What do you think about that?
>
It goes in the wrong direction compared to just about everything else that
works on Unixy systems, where you have a config-file to set your normal
parameters (usually requiring root to change them), and the environment
to override some of that if you need to test something.
With your patch, "HOME=/put/core-dumps/here nagios -f nagios.cfg" would
no longer put core dumps in /put/core-dumps/here. That'd be a sad thing.
If you really want this functionality you should write it as a NEB-module
instead. It's really quite easy.
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> Hi everybody,
>
> Playing with coredumps, I've found that nagios gets homedir not from passwd
> entry, but from $HOME env variable.
> With this patch, Nagios will determine homedir of nagios user via
> getpwnam(3) call, and fallback to $HOME if failed.
>
> It would be great to see this patch (based on last CVS snapshot) in the
> official source tree.
> What do you think about that?
>
It goes in the wrong direction compared to just about everything else that
works on Unixy systems, where you have a config-file to set your normal
parameters (usually requiring root to change them), and the environment
to override some of that if you need to test something.
With your patch, "HOME=/put/core-dumps/here nagios -f nagios.cfg" would
no longer put core dumps in /put/core-dumps/here. That'd be a sad thing.
If you really want this functionality you should write it as a NEB-module
instead. It's really quite easy.
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]