balabit/syslog-ng-3.4 — pull request #3 by algernon (2012-08-10 08:31:54+00:00)
Title: confgen: Implement a built-in system() generator

The system SCL plugin relies on a script (generate-system-source.sh)
to generate the block system() expands into. While this is flexible
and easy to modifiy, it has the disadvantage of running an external
script at startup, which is undesirable in many situations, including
when using a strict AppArmor profile.

However, a generated system() is useful in a lot of situations,
ranging from creating portable, system-agnostic configuration files to
supporting sysvinit and systemd with the same config.

For these reasons, this patch implements a built-in system()
generator, that does not rely on the generate-system-source.sh script
at all, but does everything itself, from C.

It should be used similarly to the existing generator:

@module confgen context(source) name(system) system(yes)

This will result in the very same system() expansion as the script's
as of this patch. The downside is that if one of the generator gets
extended, the other must be updated too, to keep them in sync.

Signed-off-by: Gergely Nagy