3132 Commits

Author SHA1 Message Date
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
Rainer Gerhards
2ef72e3556
Merge pull request #2330 from jgerhards/errmsg-gss-misc
gss-misc: use new errmsg interface
2017-12-31 10:39:15 +01:00
Rainer Gerhards
046ce2ac82
Merge pull request #2328 from rgerhards/better-q-shutdown-msgs
core/queue: emit better status messages at rsyslog shutdown
2017-12-31 10:37:32 +01:00
Rainer Gerhards
49e13d5555 core/queue: emit better status messages at rsyslog shutdown
this helps to diagnose issue - unfortunately we need more
work to ensure that the messages always make it to the user. This
is a start and hopefully useful at least for the testbench, possibly
more.
2017-12-30 17:08:34 +01:00
Jan Gerhards
43da189d89 gss-misc: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2017-12-30 16:28:17 +01:00
Rainer Gerhards
ce1f36861d action bugfix: bHadAutoCommit handled in thread-unsafe way
This internal state was improperly handled and most probably caused
(hard to see) issues when action instances were run on multiple worker
threads. It looks like the state variable was forgotten to move over
to worker state when action workers were introduced. This patch
fixes that.

closes https://github.com/rsyslog/rsyslog/issues/2046
2017-12-30 12:41:25 +01:00
Jan Gerhards
d727d49a35 tcpsrv: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2017-12-29 16:20:46 +01:00
Rainer Gerhards
a4fc749768 permit UBSan integer overflow where intentional 2017-12-28 17:40:03 +01:00
Janmejay Singh
c205dcba26 Fix lookup-table unsigned underflow in array-table lookup and empty-table handling across array and sparse-array tables (first one was identified in #2295 after first set of identified issues were fixed) + single-line cosmetic changes that kill trailing spaces/tabs 2017-12-27 19:01:23 +05:30
Rainer Gerhards
29533f53dd
Merge pull request #2300 from jgerhards/errmsg-lookup
lookup: use new errmsg interface
2017-12-27 12:11:09 +01:00
Janmejay Singh
66bdb31377 Fix lookup-table unsigned underflow in quick-sort and binary-search comparators (identified in #2295) 2017-12-27 13:20:29 +05:30
Jan Gerhards
0134348e15 lookup: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2017-12-26 17:15:39 +01:00
Rainer Gerhards
d71ab8a5cc
Merge pull request #2296 from rgerhards/i2295
lookup tables: fix undefined behaviour
2017-12-26 15:37:44 +01:00
Rainer Gerhards
4f13c27d5a lookup tables: fix undefined behaviour
bsearch is not permitted to be called with NULL ptr for array.

Detectedb by LLVM UBSan.

see also https://github.com/rsyslog/rsyslog/issues/2295
2017-12-25 16:20:32 +01:00
Jan Gerhards
1987cabbbf rsconf: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2017-12-25 15:46:03 +01:00
Rainer Gerhards
8cb0a95a38 code style: fix too-long lines 2017-12-23 18:25:37 +01:00
Rainer Gerhards
49f9b26601
Merge pull request #2246 from mrworkman/rscript-is-timestamp
Add is_time() RainerScript function.
2017-12-22 12:49:02 +01:00
Rainer Gerhards
2af5c24d2d
Merge pull request #2285 from PascalWithopf/line_length_correction
codestyle: partially reduce line length to 120
2017-12-21 18:54:10 +01:00
PascalWithopf
29c9fb1f9a codestyle: reduce line length to 120
lines are still checked for a length of 125 because
these are just some of the lines
2017-12-21 17:09:32 +01:00
Rainer Gerhards
e05b3ff0fd core/glbl: remove long-unused option $optimizeforuniprocessor
This was still available, but had no effect (for ~10 years or so). The
plumbing is now removed. If someone tries to use the option, an
error message is generated.

closes https://github.com/rsyslog/rsyslog/issues/2280
2017-12-21 14:50:35 +01:00
Rainer Gerhards
bc8e88be63
Merge pull request #2277 from rgerhards/i1976
mmexternal: refactor and enhanced testbench test
2017-12-21 12:39:01 +01:00
PascalWithopf
79de51e4fc codestyle: reduce max line length to 125 2017-12-20 16:16:57 +01:00
Rainer Gerhards
8d807e35f0 mmexternal bugfix: potentially missing argv[0]
This is incorrect and can cause problems with some language, namely go.

see also https://github.com/rsyslog/rsyslog/issues/1858
closes https://github.com/rsyslog/rsyslog/issues/2278
2017-12-20 15:58:26 +01:00
Rainer Gerhards
ba66b20d20 core bugfix: race on LocalHostIP property during startup
The way the default was set could lead to a race if e.g. two internal
messages were emitted at startup when the property was not yet set. This
has been seen to happen in practice. It had no bad effect except a very
small stationary memory leak, but made using thread analyzers unreliable
(as it was rightfully detected as a problem).

closes https://github.com/rsyslog/rsyslog/issues/2012
2017-12-19 18:53:18 +01:00
Rainer Gerhards
fa70c62669
Merge pull request #2262 from rgerhards/i2228
core bugfix: MAXFNAME was set too low
2017-12-19 18:12:37 +01:00