Commercial Support Clients: Clients with support contracts can get escalated support assistance by visiting Nagios Answer Hub. These forums are for community support services. Although we at Nagios try our best to help out on the forums here, we always give priority support to our support clients.

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.

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

Postby Guest » Fri Oct 26, 2012 5:11 pm

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

> 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.


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

Return to Open Source Nagios Projects

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 17 guests