This commit adds support for new parameter permit.AtSignsInHostname
to allow at-signs characters in hostname rfc3164 BSD field. The parameter
value default to 0. The patch is similar to the one introduced by
Rainer Gerhards <rgerhards@adiscon.com> in 8.20.0 to support slashes
characters in hostnames.
Slashes and at-signs may be inserted by syslog-ng at least on 3.2 when
it runs with use_dns(no), keep_hostname(no) and chain_hostnames(yes).
The at-sign may happen when the syslog-ng host sends local logs in rfc3164
format. In that senario, the hostname field is prefixed by the source
name and an at-sign character.
As for the slash character, it is inserted by syslog-ng to chain
hostnames and ip addresses accross relays.
This patch solves some issues the clang static analyzer shows. There
are three false positives in regard to getopt() handling, which we have
"fixed" anyhow. Also, we fix some memory leaks that are primarily cosmetic
because they are so small they would not affect actual processing. Also,
they are very very extremely unlikely.
fixes a warning about potential uninitialized use. However, the warning
was invalid and based on incomplete static code analysis. Anyhow, we
"fix" it, as this does not add any real overhead - and it's nicer to
compile cleanly.
The capability has been added for module to specify that they do not
like being unloaded.
related bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=222
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
another milestone commit: the program works, the new interface
is used, some more cleanup is needed and the per-ruleset config
options are still missing. But we are getting closer...