configure.ac: Improved the linux capability check

The Linux capabilities check was dependent only on the existence of
<sys/capability.h>. While there was a check performed for -lcap and its
usability, if that check failed, linux capability support was never
turned off.

This caused problems on recent FreeBSDs, where the header exists, but -
naturally - the library does not. This patch fixes #175, by modifying
the check to turn off the feature if the library is not available.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Preparations for syslog-ng 3.6.0alpha1

Bumped VERSION to 3.6.0alpha1; renamed NEWS to NEWS.md, and added
noteworthy changes since 3.5.5.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
configure.ac: Fix --enable-linux-caps

While fixing the auto-detection of Linux capabilities,
--enable-linux-caps got broken. This patch corrects that, so that both
work now.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
configure.ac: Bump the libmongo-client dependency to >= 0.1.8

The MongoDB destination requires functionality from libmongo-client >=
0.1.8, bump the minimum library version. This fixes #181.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
afsocket: Implement UNIX credentials support for FreeBSD

FreeBSD supports passing UNIX credentials over UNIX sockets, but in a
different way than Linux. This patch adds auto-detection and a little
wrapping, and ports the functionality to FreeBSD, and with that,
closes #182.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
transport-aux: #include <string.h>

Since we're using memcpy(), include <string.h> to make Clang on FreeBSD
happy.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
configure.ac: Fix the struct ucred detection

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
service-management: add service_management_get_type() function

Signed-off-by: Tibor Benke <ihrwein@gmail.com>
tests: Silence a compiler warning

Do #include <string.h> in tests/unit/test_ringbuffer.c, for the sake of
basename(), to silence a compiler warning.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge pull request #179 from lbudai/f/merge-proto-fix

F/merge proto fix
afsocket: add systemd-syslog() source

Signed-off-by: Tibor Benke <ihrwein@gmail.com>
system-source: change to systemd-syslog() source, when the running init system is systemd

Signed-off-by: Tibor Benke <ihrwein@gmail.com>
Merge pull request #184 from ihrwein/f/add-systemd-syslog-source

F/add systemd syslog source
Enable threaded mode by default

With this patch, threaded(yes) becomes the default. In case one wants to
turn it off, threaded(no) must be set.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
afsocket: Consider afsocket-systemd-override.h a source file too

In order to be able to build from a make dist tarball, we need to ship
afsocket-systemd-override.h too, so add it to the list of afsocket
sources.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
logwriter: throttle bug fixed

in log_writer_perform() we should use LW_FLUSH_NORMAL, otherwise
throttle won't work

flush_waiting_for_timeout renamed to waiting_for_throttle
- log_queue_check_items() set timeout_msec if throttle is used

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>