12000 Commits

Author SHA1 Message Date
Rainer Gerhards
a570ddfcd7 dev tools: do not use -ti in docker run
this does not properly work when the script is used in
cron jobs
2018-01-31 11:55:46 +01:00
Rainer Gerhards
5c35bdd632
Merge pull request #2451 from rgerhards/travis-require-mac
Travis: "tactical" modifications
2018-01-31 11:34:57 +01:00
Rainer Gerhards
254785e147 testbench: disable omprog-cleanup.sh test as it is unstable
see also https://github.com/rsyslog/rsyslog/issues/2403
2018-01-31 09:57:36 +01:00
Rainer Gerhards
c8ad3cb27f travis: again require macOS build to succeed
We made this optional while Travis had problems with macOS builds.
2018-01-31 09:49:37 +01:00
Rainer Gerhards
c4ee426be6
Merge pull request #2449 from rgerhards/container-user
devtools: run dev container under current user credentials
2018-01-30 14:42:33 +01:00
Rainer Gerhards
7bfb25e0bb
Merge pull request #2448 from jgerhards/errmsg-nsd_gtls
nsd_gtls: use new errmsg interface
2018-01-30 08:11:26 +01:00
Rainer Gerhards
de88a5984d devtools: run dev container under current user credentials 2018-01-30 08:09:41 +01:00
Jan Gerhards
703669762d nsd_gtls: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-29 19:04:54 +01:00
Rainer Gerhards
10437a39d9 maintain ChangeLog 2018-01-28 16:57:23 +01:00
Rainer Gerhards
05b8bb3510
Merge pull request #2435 from rgerhards/i2432
config: optimize-out totally empty "if" statements
2018-01-28 16:55:43 +01:00
Rainer Gerhards
edb81c0283 conf optimizer: small improvement
now that we have NOP-removal, we can restructre if compression a
bit to make it more straightforward
2018-01-27 18:06:21 +01:00
Rainer Gerhards
a48cce29c9 conf optimizer: remove left-over NOPs
First step in optimizer is to replace unneded statements by NOP,
which are now removed in step 2.

closes see also https://github.com/rsyslog/rsyslog/issues/2432
2018-01-27 18:03:01 +01:00
Rainer Gerhards
56cfe01974 conf optimizer: detect empty "if" and replace by NOP
see also https://github.com/rsyslog/rsyslog/issues/2432
2018-01-27 17:16:32 +01:00
Rainer Gerhards
b305c5e3b4 maintain ChangeLog 2018-01-27 12:13:26 +01:00
Rainer Gerhards
ef48d2e878
Merge pull request #2439 from rgerhards/cid187116
config: fix file handle leak in backtick parameters
2018-01-27 12:12:26 +01:00
Rainer Gerhards
565f74963c
Merge pull request #2441 from rgerhards/inline-alpine
remove build warnings under Alpine Linux
2018-01-27 10:54:05 +01:00
Rainer Gerhards
6daf835cd0 fix build warnings on alpine linux
Alpine compiles with size optimization, and then the compiler
finds a couple of inline functions that are really not worth it.
2018-01-26 17:26:44 +01:00
Rainer Gerhards
402af40827
Merge pull request #2443 from rgerhards/travis-minimal
travis: use minimal image for docker-based tests
2018-01-26 16:02:02 +01:00
Rainer Gerhards
317f1d71a5 travis: use minimal image for docker-based tests 2018-01-26 08:43:34 +01:00
Rainer Gerhards
4f7c3438a7 testbench: do not override default Alpine CFLAGS
... as this brought us away from the abuild environment. Most importantly,
-Os was overriden by -O2, which did make a lot of warning go away.
2018-01-25 17:10:59 +01:00
Rainer Gerhards
9c4d4d95e0
Merge pull request #2438 from rgerhards/testbench-temp-disable
testbench: temporarily disable sndrcv_kafka-vg-rcvr.sh test
2018-01-25 12:39:53 +01:00
Rainer Gerhards
a479b78cd1 config: fix file handle leak in backtick parameters
This is a very recent regression from this week's merge, not in
any released code.

detected by Coverity Scan, CID 187116
2018-01-25 12:04:26 +01:00
Rainer Gerhards
8b6169fde8 testbench: temporarily disable sndrcv_kafka-vg-rcvr.sh test
This test is known to fail rather frequently. We disable it until
the root cause is solved, because otherwise CI does have too many
false positive failures.

see also https://github.com/rsyslog/rsyslog/issues/2434
2018-01-25 11:26:28 +01:00
Rainer Gerhards
98346d319e
Merge pull request #2429 from jgerhards/errmsg-lmcry_gcry
lmcry_gcry: use new errmsg interface
2018-01-25 08:25:54 +01:00
Rainer Gerhards
c2446e3273 maintain ChangeLog 2018-01-24 18:25:50 +01:00
Rainer Gerhards
997a0b339e
Merge pull request #2433 from rgerhards/config.enable
config: add config.enable parameter
2018-01-24 18:14:25 +01:00
Rainer Gerhards
548067fcc0 config: add ability to disable config parameter ("config.enable")
For auto-generated configs, it is useful to have the ability to disable some
config constructs even though they may be specified inside the config. This
can now be done via the ```config.disable``` parameter, applicable to all
script objects. If set to ```on``` or not specified, the construct will be
used, if set to any other value, it will be ignored. This can be used
together with the backtick functionality to configure enable and disable
from either a file or environment variable.

Example:
Let's say we want to conditionally load a module. Environment variable ```LOAD_IMPTCP```will be either unset or ```off``` . Then we can use this config construct:
```
module(load="imptcp" config.enabled=`echo $LOAD_IMPTCP`)
```
It the variable is set to ```off```, the module will **not** be loaded.

closes https://github.com/rsyslog/rsyslog/issues/2431
2018-01-24 16:16:45 +01:00
Rainer Gerhards
20d24a077e maintain ChangeLog 2018-01-24 14:12:02 +01:00
Rainer Gerhards
de0a9dd107
Merge pull request #2426 from rgerhards/i2151
config: add include() script object
2018-01-24 14:09:34 +01:00
Rainer Gerhards
777c3bd0c7
Merge pull request #2430 from mbiebl/no-pidfile
Don't write pid file when running under systemd
2018-01-24 13:08:31 +01:00
Michael Biebl
6fafe7c996 Don't write pid file when running under systemd
systemd does not require a pid file to track the rsyslogd process.
By not writing a pid file, the rsyslog service can be locked down even
further as it no longer needs write access to /var/run.
2018-01-23 22:44:45 +01:00
Jan Gerhards
c0ec6a056c lmcry_gcry: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-23 19:14:17 +01:00
Rainer Gerhards
8cb9c5b3d2 script: implement cat file backticks capablity
gets us a bit closer to (essential) shell backtick capability
2018-01-23 16:51:28 +01:00
Rainer Gerhards
fb750bcd39
Merge pull request #2425 from jgerhards/errmsg-obj.c
obj: use new errmsg interface
2018-01-23 16:46:36 +01:00
Rainer Gerhards
6327e43ea9 config: add include() script object
This permits to include files (like legacy $IncludeConfig) via a
script object. Needless to say, the script object offers more
features:

- include files can now be
  - required, with rsyslog aborting when not present
  - required, with rsyslog emitting an error message but otherwise
    continuing when not present
  - optional, which means non-present include files will be
    skipped without notice
  This is controlled by the "mode" parameter.
- text can be included form e.g. an environment variable
  --> ex: include(text=`echo $ENVVAR`)

This finally really obsoletes $IncludeConfig.

closes https://github.com/rsyslog/rsyslog/issues/2151
2018-01-22 18:36:03 +01:00
Jan Gerhards
f578096d1c obj: use new errmsg interface
see aso https://github.com/rsyslog/rsyslog/issues/1684
2018-01-22 18:06:03 +01:00
Rainer Gerhards
86c08cb3b6 maintain ChangeLog 2018-01-22 12:12:27 +01:00
Rainer Gerhards
9455a861f4
Merge pull request #2419 from rgerhards/backticks
config: add ability to use environment variables for config params
2018-01-22 12:10:11 +01:00
Rainer Gerhards
5d2cbe5ad0
Merge pull request #2422 from rgerhards/invld-stderr
cleanup: remove forgotten debug message
2018-01-21 14:56:04 +01:00
Rainer Gerhards
ff4a354f7b testbench: add test for new rscript backticks feature 2018-01-21 12:52:30 +01:00
Rainer Gerhards
96f59eeb83 config: add ability to use environment variables for config params
We introduce strings enclosed in backticks, which is along the lines
of what the shell does. However, we currently only support
"echo $VARNAME" -- but this may be extended later on.

closes https://github.com/rsyslog/rsyslog/issues/2416
2018-01-21 12:46:44 +01:00
Rainer Gerhards
d8b4e78e18 cleanup: remove forgotten debug message 2018-01-21 12:22:06 +01:00
Rainer Gerhards
11efe69aee
Merge pull request #2415 from jgerhards/errmsg-ruleset
ruleset: use new errmsg interface
2018-01-20 10:50:22 +01:00
Rainer Gerhards
33642b6faf maintain ChangeLog 2018-01-19 12:08:41 +01:00
Rainer Gerhards
82e30bf85f
Merge pull request #2413 from rgerhards/i2054
core: set TZ on startup if not already set
2018-01-19 12:04:51 +01:00
Jan Gerhards
764deee8b3 ruleset: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-19 11:44:46 +01:00
Rainer Gerhards
634c496fd3
Merge pull request #2414 from rgerhards/travis-cron
travis fix: cron job was not executed
2018-01-19 10:35:24 +01:00
Rainer Gerhards
d01ea7e2eb core: set TZ on startup if not already set
In theory, TZ should be set by the OS. Unfortuantely, this seems
to be not the case any longer on many Linux distros. We now check
it and set it appropriate if not already given.

closes https://github.com/rsyslog/rsyslog/issues/2054
2018-01-19 10:29:56 +01:00
Rainer Gerhards
9052f535fd travis fix: cron job was not executed 2018-01-19 08:58:30 +01:00
Rainer Gerhards
69089a8f53 maintain ChangeLog 2018-01-19 08:20:49 +01:00