3156 Commits

Author SHA1 Message Date
Rainer Gerhards
1fe2b08b89
Merge pull request #2546 from rgerhards/i2421
fix memory leak in imfile readmode 0
2018-03-17 12:36:05 +01:00
Rainer Gerhards
a21e87f5ba fix invalidly-placed header guard
detected by lgtm static analyzer
2018-03-17 10:29:19 +01:00
Rainer Gerhards
6d850a1aa9 fix behaviour not totally defined by C standard
see also: https://stackoverflow.com/questions/32916575/how-to-use-zd-specifier-with-printf

detected by lgtm static analyzer
2018-03-17 10:26:27 +01:00
Rainer Gerhards
c55f37ef71 bugfix/imfile: memory leak in readMode 0
Bug is actually in stream object, but currently exposed only via imfile.
Happens when in readMode 0 a partial line is read and no more data is
present in the file during that iteration. One partial message is lost
in this case.

closes https://github.com/rsyslog/rsyslog/issues/2421
2018-03-15 13:23:26 +01:00
Jan Gerhards
b742cf4b3e parser: use new ermsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-02-16 13:10:18 +01:00
Rainer Gerhards
c9fa875c44 fix global parameter name shutdown.enable.ctl-c
the config system actually does not permit "-" inside parameter
names. This has now been changed to "shutdown.enable.ctlc".

Note: this was never released and only present in 8.33 pre-release
versions.

closes https://github.com/rsyslog/rsyslog/issues/2482
2018-02-15 18:44:32 +01:00
Rainer Gerhards
c9f00b9f8c
Merge pull request #2474 from jgerhards/errmsg-nsdpoll_ptcp
nsdpoll_ptcp: use new errmsg interface
2018-02-12 15:26:43 +01:00
Rainer Gerhards
55d537e218
Merge pull request #2470 from rgerhards/f2450
lmsig_ksils12: emit error message if chown() to sig file fails
2018-02-12 10:03:02 +01:00
Jan Gerhards
0cb86d6ee1 nsdpoll_ptcp: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-02-12 09:21:10 +01:00
Rainer Gerhards
e22e70840e lmsig_ksils12: emit error message if chown() to sig file fails
see also https://github.com/rsyslog/rsyslog/pull/2450
2018-02-11 18:22:59 +01:00
Jan Gerhards
701f44856c statsobj: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-02-11 16:43:44 +01:00
Rainer Gerhards
68ec1305d7
Merge pull request #2450 from allanpark/Issue_2446_lmsigls12_fix_directory_creation_code
BUGFIX, Issue 2446. Fix directory creation code in lmsig_ksils12 plugin
2018-02-10 18:21:11 +01:00
Jan Gerhards
3db937f376 stream: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-02-05 16:24:46 +01:00
Jan Gerhards
97c223a198 glbl: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-02-02 10:00:05 +01:00
Jan Gerhards
b7fde7afa4 dynstats: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-02-01 09:21:43 +01:00
Allan Park
9620e3ffcc BUGFIX, Issue 2446. Fix directory creation code in lmsig_ksils12 plugin 2018-01-30 13:02:43 +02: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
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
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
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
de0a9dd107
Merge pull request #2426 from rgerhards/i2151
config: add include() script object
2018-01-24 14:09:34 +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
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
11efe69aee
Merge pull request #2415 from jgerhards/errmsg-ruleset
ruleset: use new errmsg interface
2018-01-20 10:50:22 +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
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
9c69d0b0bb
Merge pull request #2410 from rgerhards/i2408
fix issues in external command line parser
2018-01-19 08:18:18 +01:00
Rainer Gerhards
79c5bb9896 core bugfix: small memory leak in external command parser
This parser is used whenever a module (e.g. omprog) needs to process
command lines. On each action definitions for actions that use the
parser a small amount of memory was leakd. It is an uncritical leak
as it only occurs during config parsing. So it leaks a couple of
KiB during startup but does not grow during actual message processing.

This is a regression in 8.32.0.
2018-01-18 12:30:22 +01:00
Rainer Gerhards
c999206dfd
Merge pull request #2409 from jgerhards/errmsg-strmsrv
Errmsg strmsrv
2018-01-18 11:48:57 +01:00
Rainer Gerhards
a3356e0062 core bugfix: misadressing in external command parser
This parser is used whenever a module (e.g. omprog) needs to process
command lines. If command parameters were given, memory misadressing
occured. This could lead to a segfault.

This is a regression in 8.32.0.

closes https://github.com/rsyslog/rsyslog/issues/2408
2018-01-18 11:31:10 +01:00
Rainer Gerhards
bcdce73362
Merge pull request #2402 from rgerhards/i2396-teste
improve testbench plumbing, new test
2018-01-18 10:54:43 +01:00
Jan Gerhards
c83afd3250 strmsrv: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-18 09:30:32 +01:00
Jan Gerhards
1216952944 datetime: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-17 19:26:19 +01:00
Jan Gerhards
b1b6b20466 datetime: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-17 19:24:16 +01:00
Rainer Gerhards
abe327b08a core bugfix: string not properly terminated when RFC5424 MSGID is used
this can lead to misadressing when the jsonmesg property is used.

closes https://github.com/rsyslog/rsyslog/issues/2396
2018-01-17 11:05:14 +01:00
Jan Gerhards
ca4c5c1912 dnscache: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-16 18:57:30 +01:00
Rainer Gerhards
2dacb45236
Merge pull request #2393 from rgerhards/cid-185407
lookup: fix dead code (caused no harm)
2018-01-16 09:21:14 +01:00
Rainer Gerhards
b6216c9246 lookup: fix dead code (caused no harm)
Detected by Coverity scan, CID 185407
2018-01-15 17:57:45 +01:00
Jan Gerhards
aefa89d3c0 tcps_sess: use new ermsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-15 10:55:34 +01:00
Jan Gerhards
05582a24ca modules: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-12 09:47:11 +01:00
Rainer Gerhards
b9cac88204 add global config setting shutdown.enable.ctl-c to enable ctl-c
It can be useful to ctl-c out of rsyslog, even if it is started via
-n, especially inside containers.  The new config setting permits
to enable this capability.

closes https://github.com/rsyslog/rsyslog/issues/533
2018-01-08 18:10:47 +01:00
Rainer Gerhards
875a2b7a12
Merge pull request #2360 from jgerhards/errmsg-conf
conf: use new errmsg interface
2018-01-05 17:52:33 +01:00
Jan Gerhards
762b8d2361 conf: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-05 14:44:15 +01:00
Rainer Gerhards
22df64124c testbench: add test case for bare empty var root access 2018-01-03 16:20:32 +01:00
Jan Gerhards
58f4b1a22b cfsysline: se new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-03 11:08:40 +01:00
Rainer Gerhards
bb6b55a3ad
Merge pull request #2331 from rgerhards/i1993
core/cstr: stringbuf.c: cstrGetSzStrNoNULL shall not modify buffer
2018-01-01 11:47:23 +01:00
Rainer Gerhards
6a190552d2 core/cstr: stringbuf.c: cstrGetSzStrNoNULL shall not modify buffer
The currently done buffer modification (add of '\0') is bad, especially when
multiple threads access the same string. It is not really an issue that needs
to be urgently fixed, as always the same data is written. However, among others,
it will pollute the thread debugger and as such prevent more elaborate automatted
tests.

closes https://github.com/rsyslog/rsyslog/issues/1993
2017-12-31 18:30:58 +01:00
Rainer Gerhards
04bd333593 core: improve queue status reporting on shutdown
The last commit (yesterday) did not properly convey when we actually
needed to cancel a thread. This commit corrects this and also
provides better information on the actual cancel operation and
some tipps for the user on how to solve it (timeout mentioned).
2017-12-31 17:30:58 +01:00