loggen: add --permanent (-T) parameter to send logs indefinitely
docs: add loggen's --permanent option to documentation
Merge pull request #285 from ihrwein/3.6/master

loggen: add --permanent (-T) parameter to send logs indefinitely
tlscontext: Make hostname check in tls certificate case insensitive
tlscontext: do not accept certificate which is not contained by the list of fingerprints

Signed-off-by: Juhász Viktor <jviktor@balabit.hu>
Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
Merge pull request #293 from lbudai/3.6/tlscontext-fix

3.6/tlscontext fix
afsmtp: linkage order fixed

Suggested-by: Michael Sterrett <mr_bones_@gentoo.org>
Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
Merge pull request #295 from lbudai/3.6/master

afsmtp: linkage order fixed
scl/scl.conf: Use a wildcard to include SCL snippets

To be able to install SCL snippets to be included by default, without
modifying scl.conf itself, use a wildcard-include. This allows
distributions to ship some of the SCLs in different packages, without
breaking the default config, or having to enable them in other ways.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge pull request #296 from algernon/f/scl/wildcard-include

scl/scl.conf: Use a wildcard to include SCL snippets
afsql: trying to do a better transaction handling

Two problems with transactions:
 * mixing DDL and DML statements in a single transaction
   (create/update table)
 * simple select can abort a transaction
   (checking if a table exists or not)

syslog-ng checks whether a table exists or not by 'select * from table'
(and get structure of the table as a side-effect...)

There are some DB-providers which abort current transaction when try to
select from a non-existing table (eg.:mssql).

libdbi provides a better, db-provider specific way to checking table existance
(this is a meta-query which always succeed).
Unfortunately, this function is buggy in pgsql driver, so we had to do
something else).

syslog-ng asks db only when the name of the table to be checked is not seen
before (this is based on a runtime information: every table is validated and
name of all validated tables are stored in a hashtable).

When the table not found in the list of validated tables:
 - active transaction is commited (if exists)
 - new transaction is started for checking if the table exists or not
    - if the table exists, its structure is updated according to the
      structure given in the config file
    - otherwise a new table is created

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
afsql: validate_table() refactored

 afsql_dd_sql_identifier_sanitize()     ->  _sanitize_sql_identifier()
 _table_is_exist()                      ->  _is_table_present()
 afsql_dd_sql_identifier_is_sanitized() ->  _is_sql_identifier_sanitized()
 `validate table`                       ->  `syslog conform table`

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
nvtable: remove error message on zero-length name value pair

I've found a use-case where I want to ignore an assignment to a name-value
pair. When using csv-parser(), sometimes we get a column we really
want to drop instead of adding it to the message.

If that's the case, it's as easy as:

csv-parser(columns("", "foo", "bar"));

Essentially the first column would be dropped. The only thing that was
ugly about this is the error message in nvtable, which has now been
by this patch.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: publish pdb_rule_get_name() function

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: implement preference of complete match over a partial match

This patch changes how db-parser() finds the rule it matches. Earlier the
first applicable rule won, even if it was only a partial match. This
means that when rules overlapped, the shorter match would have been
found, if it was the first to be loaded.

This patch introduces a strong preference for rules that match the
input string completely. The load order is still applicable though,
it is possible to create two distinct rules that would match the same
input, in those cases the first one to be loaded wins.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: implement r_find_all_applicable_nodes() function

This function finds all rules that would match a specific message.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
pdbtool: add listing of conflicting patterndb rules

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: use additional <value> tags in pdbtool match --debug-pattern

pdbtool match when used with the --debug-pattern option used a low-level
lookup function, that didn't perform all the db-parser actions specified
in the rule. This patch fixes that.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Merge pull request #292 from lbudai/3.6/f/afsql-transaction-fixes

3.6/f/afsql transaction fixes
afsocket: fix for platforms which not support credential passing

Fixes #298

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