pathutils: Fixed pathutils functions.

g_file_test flags has an "or" relation instead of the incorrectly
assumed "and" relation. Wrote a unittest, too.

Signed-off-by: Viktor Tusa <tusa@balabit.hu>
Merge pull request #81 from balabit/3.6/f/add-globalconfig-to-logpipe-constructor

3.6/f/add globalconfig to logpipe constructor
escape glob to avoid weird behaviour when cwd contains .pdb files
Merge pull request #82 from ccin2p3/f/patterndb

escape glob to avoid weird behaviour when cwd contains .pdb files
configure.ac: Improve the --with-libmongo-client behaviour

Make --with-libmongo-client support an "auto" setting, and make that the
default. This fixes #83.

Reported-by: Andras Mitzki <micek@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Merge pull request #84 from algernon/h/with-libmongo-client-auto

configure.ac: Improve the --with-libmongo-client behaviour
timeutils: Support Tzif3 format timezone files too

The latest tzdata release added a new tzif version, with some minor
changes. This patch adds support for the format to our zone info parser,
and fixes #86.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
.travis.yml: Build all branches, except wip ones

Restricting tested branches to master branches and merge/ branches was
far too strict. Instead of doing that, skip wip branches only, and test
everything else.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
.travis.yml: Enable VERBOSE mode when testing

We want to see the test failures when they happen in CI, so enable
VERBOSE=1 when doing make check and make func-test.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Merge pull request #89 from algernon/h/travis-all-branches

Travis changes
Merge pull request #88 from algernon/f/tzfile3

timeutils: Support Tzif3 format timezone files too
Merge remote-tracking branch 'talien/f/pathutils-is-dir-fix'
tfgeoip: Handle the failed lookup case gracefully

When a GeoIP lookup fails, do not try to use the result, as trying to
append NULL to a GString results in a GLib warning, which is not nice.

Reported-by: Fabien Wernli
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
system(): Don't use /dev/klog in a FreeBSD jail

When figuring out what to expand system() to, check whether we're in a
jail when running on FreeBSD, and don't include /dev/klog if we are.
This fixes #93.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Merge pull request #99 from algernon/f/system/freebsd-jail

system(): Don't use /dev/klog in a FreeBSD jail
Merge pull request #97 from algernon/h/geoip/fail-gracefully

tfgeoip: Handle the failed lookup case gracefully
syslog-ng.pc.in: Add scldir and datarootdir

The former is primarily for syslog-ng-incubator, the latter is to
silence config.status and for correctness' sake.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Merge pull request #100 from algernon/f/scl/new-variables

syslog-ng.pc.in: Add scldir and datarootdir
dbparser: Validate the current time when ticking

The tick timer did not validate the current time, which could result in
timers being scheduled too far away from the current time.

Systems that have CLOCK_MONOTONIC shouldn't be affected because those do not
go backwards.

Signed-off-by: Juhasz Viktor <jviktor@balabit.hu>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
patterndb: handle time going backwards

When the system time is going backwards, we should try to realign patterndb
time keeping with the system time. To do that, we save the current system
time in last_tick, so an upcoming tick will actually have an effect.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>