On 2014-01-19 17:58, Sven Nierlein wrote:
Hi,
I stumpled over the workers changing into /tmp/[nagios-workers]:
https://github.com/naemon/naemon-core/blob/master/naemon/lib/worker.c#L665
I see some problems here, the first one is that /tmp/nagios-workers does not
exist and won't
be created anywhere. I am not even sure if changing the folder is a good idea
at all. It
broke some of my checks which use relative paths and we use that a lot in OMD.
Is changing
into the HOME folder of that user an option?
Then the build breaks on SLES11 machines with :
cc1: warnings being treated as errors
worker.c: In function enter_worker:
worker.c:665: error: ignoring return value of chdir, declared with attribute
warn_unused_result
I assume the (void)chdir supresses that on the other build machines, however it
doesn't work on
SLES (gcc4.3.4)
Any ideas?
So, apparently nobody liked what it was doing, and it was only doing it
for vague, historical reasons.
I've changed it to try to go to $HOME instead.