Updated news with Debian init script bug
Re-enable checks for initgroups() and unsetenv()

7b7c13c4420da1231bb300215630b03588766b2c accidentally removed
configure-time checks for initgroups() and unsetenv() availability,
essentially generating dead code due to HAVE_* checks and introducing
issues with dropping permissions. This patch simply restores those
checks.
Merge pull request #52 from shahn/master

Re-enable checks for initgroups() and unsetenv()
Fix "make check" compile error on Debian stable

Signed-off-by: Sebastian Hahn <sebastian@torproject.org>
Allow compilation to succeed on OSX

Fix a few instances of unportable Code:

 - make the get_current_dir_name() call dependant on a configure check

 - make time logging code use casts to long uniformly

 - include some headers where needed

 - replace assignment of '\0' with NULL so modern clang doesn't complain
   about assigning null pointers via expressions evaluating to zero

Signed-off-by: Sebastian Hahn <sebastian@torproject.org>
Allow "make check" to succeed on OSX

Fix a few instances of unportable code by replacing uint with unsigned
int and changing function pointer casts for signal(). Fix up some header
includes.

Signed-off-by: Sebastian Hahn <sebastian@torproject.org>
Merge pull request #53 from shahn/check_debian

Fix "make check" compile error on Debian stable
Merge pull request #55 from shahn/osx

Fix compilation on OSX
xodtemplate: Avoid reading uninitialized memory

Let's say a config file contains something like

  define service {
      service_description foo
      host_name
  }

We first tokenize this on newlines, and separate them with newlines.
After that, we tokenize the lines on the first whitespace after
the first nonwhitespace character - for the host_name line, this will fail.

However, we'd think that we'd been successful, and started to insert
whatever random garbage was in the memory after this key (which, due to
strip()ing, was probably the end of the key name, assuming we had
indentation in place).

In this case, we wouldn't start, because looking up a host named "ame"
or so would most likely fail and a confused user would remain, wondering
who told Nagios to look for that. In other cases, who knows?

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
removed parallelize_check from services config

parallelize_check has never been implemented and confuses the user.
Since changing the value has no effect at all and we do not want to
carry dead code around it is now gone.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
do not break module interface

reintroduce the removed int from parallelize_check in order to avoid
recompiling all broker modules which make use of the service struct.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
Check local naemon folder instead of root

Most systems got status "warning" on this test by default when testing root. Naemon should always be OK from start. This looks better =)
shadownaemon: acknowledged flag has not been syncronized

acknowledged flag was never syncronized yet.

Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
shadownaemon: disable syslog logging

since this daemon is running in a tmp folder anyway we do not want to pollute
our syslog.

Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
query-handler: Truly assume oneshot queries

We pretended to earlier, but we really didn't. With this patch,
we do and the code once again matches both the code comments
and earlier commit messages.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Add naemon-query.py

A shameless ripoff of the code used in Merlin, but operational
and enough to allow people to play around with the query handler
somewhat.

Signed-off-by: Andreas Ericsson <ae@op5.se>
naemon-query: Avoid debug-printing junk to stdout

It makes it impossible to use this program for the gourcery
demo.

Signed-off-by: Andreas Ericsson <ae@op5.se>