Re: [Nagios-devel] Erroneous use of getcwd on lib/nspath.c

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] Erroneous use of getcwd on lib/nspath.c

Post by Guest »

Hi Andreas,

Good to read from you :)

* Andreas Ericsson (ae@op5.se) wrote:
> I think you mean PATH_MAX. 4096 is the upper limit, so we'll be fine
> using that (except for truly pathological cases where someone may
> use a system where PATH_MAX is larger).

Correct me if I'm wrong, but here you prefer to leave an static value
instead a macro that has been created exactly for this pourpose?

This doesn't make sense to me. At least you don't want to include
limits.h.

> We need an extra byte to spare for a nul byte in case the system we're
> on doesn't leave any room for it in its getcwd() implementation (AIX,
> for instance).

Oh, ok. I didn't know that some unix treat the function differently.
Glad to learn this.

> > Is it sounds resonable?
>
> Sort of, but it's not important and the current code works just fine
> as it is, so I'll drop this patch for now, apart from the return
> code check thing.

So, what about the segfault i've received when running with thousands of
directories pointing to main config file? It will remain the there
because you want to?

Thanks for reading and keep with the good job.

-rm






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: ricardo.maraschini@opservices.com.br
Locked