service-management: use virtual functions
systemd-syslog: auto migrate from unix-stream("/dev/log") to systemd-syslog source
when systemd is used
service-management: fix always using of dummy service management
system-source: Use systemd-journal() if appropriate

If running under systemd, use the systemd journal instead of the
forwarding socket.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
logmatcher: Fix the ignore-case and store-matches flag parsing

To parse these flags properly, we need to use "ignore-case" and
"store-matches" in the C struct, because cfg_process_flag() expects them
in that format. This fixes #241.

Reported-by: andrejzverev
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge pull request #243 from algernon/f/3.6/system-source/systemd-journal

system-source: Use systemd-journal() if appropriate
system-source: Allow messages to flow through JSON

In case a message does not match the JSON marker, allow them to flow
through unmodified. This makes system() work with non-CIM messages
again.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge pull request #245 from algernon/f/3.6/system-source/json-channels

system-source: Allow messages to flow through JSON
Merge pull request #236 from ihrwein/f/systemd-syslog-source-refactor

F/systemd syslog source refactor
Preparations for syslog-ng 3.6.0beta1

Bumped the version in VERSION, and added noteworthy changes to NEWS.md.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
lib/tlscontext.c: This modify the loading of certificate, to load a cert
chain intead of a single certificate. It don't break the earlier
funcionality, but extends it, if you do this:
cat ~/server.crt ~/signing.crt ~/intermediate.crt >/etc/syslog-ng/chain.crt
Assuming the following:
Other sides know a root.crt, which signed intermediate.crt, intermediate
signed signing.crt, and signing signed the server.crt.
filter: fix using only the last inserted item in in-list filter

Signed-off-by: Tibor Benke <tibor.benke@balabit.com>
Merge pull request #246 from pasztor/3.6/master

Support for loading certificate chains in TLS context
Merge pull request #250 from ihrwein/f/in-list-filter-fixes

filter: fix using only the last inserted item in in-list filter
systemd-journal: Fix parallel build

In order to be able to build in parallel, add a $(MODULE_DEPS_LIBS) to
the appropriate _DEPENDENCIES in modules/systemd-journal/Makefile.am.
This fixes #248.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
afuser: Fix compilation on FreeBSD

On FreeBSD, we need ->ut_name instead of ->ut_user, and the utmp stuff
needs an <inttypes.h> include. This patch adds those, and fixes #249.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
control-server: Fix compile warnings

Do #include <string.h> in lib/control/control-server.c, because we're
using strlen() and similar functions defined therein.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
filter-call: propagate modify value in filter() subexpressions

Whether a filter changes the message is a required information to
decide whether to clone a message when entering a log path. When
using the filter() expression within a filter, this information wasn't
properly propagated, which is fixed by this patch.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
filter-re: fix match() filter initialization

The match() subexpression is a tweaked version of the generic FilterRE
class, however the constructor didn't properly initialize the embedded
FilterRE superclass. And the open coded version of the initialization
lacked setting up the init virtual method, causing the modified flag
not to be properly initialized in case store-matches was specified.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
system-source: Do not use /dev/kmsg when using systemd

When using the Journal, do not use /dev/kmsg, because that is included
in the journal too, and using it would lead to log duplication.

Reported-by: Andras Mitzki <micek@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>