shadownaemon: added more columns to cache

add some more columns to cached configuration.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
shadownaemon: read of size 0 mean eof

or at least an error, so break and do the error handling. This avoids
running in endless loops when the connection breaks right in the middle
of the transfer.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
shadownaemon: added missing comma

which breaks the livestatus query otherwise

Signed-off-by: Sven Nierlein <sven@nierlein.de>
commands: Add back missing commands

We accidentally lost the commands
CMD_SCHEDULE_HOSTGROUP_{HOST,SVC}_DOWNTIME when I gave this code a
facelift a while back. This patch adds them back. In theory, it should
be possible to statically ensure that all commands are implemented...

Also fixed a typo in an error message, comamnd -> command.

This fixes #71.

Signed-off-by: Anton Lofgren <alofgren@op5.com>
Merge pull request #72 from catharsis/issue-71

Issue 71
Abort when memory allocation fails

This patch adds an aborting implementation of the following functions:

malloc
calloc
realloc
strdup
strndup
asprintf

and changes all calls to them to their aborting counterpart (prefixed by
nm_, e.g nm_malloc).

Why? Because we really, really, really don't handle
memory allocation failure gracefully at all, ever. Maybe we want to
pretend that we do by doing:

if ( ptr = malloc(sizeof(foo)) == NULL)
    return NULL;

But how is anyone supposed to know that we just ran out of memory from
that? Not that it matters since naemon is not designed to degrade
gracefully *anyway*. What would we do if we somehow successfully
identified that we have no memory? It's not like we can do anything
worthwhile anyways, say, like running checks or sending notifications or
...

This has the positive side effect of getting rid of a lot of pointless
complexity and silencing a whole bunch of warnings about "unused return
values" and the like. See #69.

Anyhow, the aforementioned checks for MA failure were not really that
common anyway, meaning that an actual scenario where we had really run
OOM would be more likely to result in a segfault than anything else.

In all, I could find *one* place where we actually did something
productive in case memory was not returned, namely when we were about to
start a new worker. And what did we do then? Log it. And abort.

In conclusion, we no longer hide/escalate errors for "someone else" to
deal with for any value of "someone else" that equals "noone".

goto endrant;

This partially fixes #69.

Signed-off-by: Anton Lofgren <alofgren@op5.com>