11636 Commits

Author SHA1 Message Date
Rainer Gerhards
164f70e17e
Merge pull request #2208 from deoren/contribute-syntax-fix
CONTRIBUTING doc - Fix header syntax, update all for consistency
2017-12-13 08:21:46 +01:00
Deoren Moor
4bbcb895c9
Fix header syntax, update all for consistency 2017-12-12 16:31:17 -06:00
Rainer Gerhards
a9601ebaec pmrfc3164: try to detected headerless message
headerless is indicated by whitespace followed by either '{' or '['.
This follows the trend to send JSON messages via syslog without any
header. We use default header values in this case.

This right now is a bit experimental; we may roll it back if
problems show up in practice.

closes https://github.com/rsyslog/rsyslog/issues/2030
2017-12-12 18:25:16 +01:00
Hugo Soszynski
078b5e5daa Merge branch 'master' of github.com:rsyslog/rsyslog into dev 2017-12-12 17:41:47 +01:00
Rainer Gerhards
fdbed029ca maintain ChangeLog 2017-12-12 16:43:51 +01:00
Rainer Gerhards
f0f173325e
Merge pull request #2201 from rgerhards/testbench-timeout
testbench: reduce startup timeout for tests
2017-12-12 16:43:01 +01:00
Rainer Gerhards
23a41c87d4
Merge pull request #2198 from rgerhards/i-1979
config: implement function parse_json()
2017-12-12 16:42:43 +01:00
Rainer Gerhards
ab7677108e cleanup: remove unused runtime instrumentation code
The --enable-rtinst configure switch and associated instrumentation
code dates back to the time pre-(valgrind, address sanitizer, ...).
It has not been actively used by rsyslog developers for years and is
inferior to the new debugging tools.

With this commit, we remove the --enable-rtinst option and do some
mild refactoring of the code itself. As it turned out, fully removing
the debug code requires a bit more of time, and we push this as a
follow-on activity. It's not as urgent as getting us to build
properly under all configure switches.

closes https://github.com/rsyslog/rsyslog/issues/2048
2017-12-12 16:39:36 +01:00
Rainer Gerhards
f23a1d3959 testbench: reduce startup timeout for tests
previous timeout caused very long runtime in cases where rsyslog
segfaulted on startup, which made the testbench failure harder to
diagnose than necessary.
2017-12-12 11:39:54 +01:00
Rainer Gerhards
0d0ff11991 config: implement function parse_json()
It is useful to be able to parse arbitrary JSON strings without the need
of an external message modification module. For example, together with
    https://github.com/rsyslog/rsyslog/issues/1977
this can be used to parse out specific fields from Amazon AWS
configuration info. There are also other ample uses for such functionality.

closes https://github.com/rsyslog/rsyslog/issues/1979
2017-12-12 11:35:29 +01:00
Rainer Gerhards
11fcd044a4 maintain ChangeLog 2017-12-12 11:14:15 +01:00
Rainer Gerhards
4d1e10ad46
Merge pull request #2191 from jgerhards/rscript_substring
rainerscript: implement substring function
2017-12-12 11:07:25 +01:00
Rainer Gerhards
cd4f27baf9 maintain ChangeLog 2017-12-11 13:47:38 +01:00
Rainer Gerhards
a256b9ab77
Merge pull request #2195 from rgerhards/i-2192
testbench: do not run tests that require root permissions by default
2017-12-11 13:45:35 +01:00
Rainer Gerhards
e3d5735a67
Merge pull request #2197 from rgerhards/i-2196
testbench: provide capability to split testbench
2017-12-11 13:45:09 +01:00
Rainer Gerhards
4e04e2ee55 testbench: provide capability to split testbench
This is necessary as we hit the Travis max runtime limit per VM,
so we need to duplicate the tests. This is done via
--enable-testbench1 and --enable-testbench2 which we than use
in different VMs.

This PR also includes updates to the Travis scripts so that we
use the new capability. We have only duplicated Travis VMs where
acutally necessary -- we may need to do more of this in the future.

closes https://github.com/rsyslog/rsyslog/issues/2196
2017-12-11 11:22:14 +01:00
Rainer Gerhards
05a8abdc38 maintain ChangeLog 2017-12-11 10:28:44 +01:00
Rainer Gerhards
5099df4319
Merge pull request #2188 from rgerhards/i-1939
RainerScript: implement previous_action_suspended() function
2017-12-11 10:26:23 +01:00
Rainer Gerhards
0a5ec439e7 testbench: do not run tests that require root permissions by default
Root permissions are uncommon in the CI environmen (requires very special
setup). Test skip if run under non-root, but that pollutes the
testbench result. So the default now is not to do that. The can still be
activated via --enable-root-tests configure switch.

closes https://github.com/rsyslog/rsyslog/issues/2192
2017-12-10 18:43:29 +01:00
Rainer Gerhards
075ad8b641
Merge pull request #2194 from rgerhards/cid-185431
"fix" Coverity scan CID 185431
2017-12-10 18:02:42 +01:00
Rainer Gerhards
b362be4a80
Merge pull request #2193 from GrayTShirt/pg-coverity
ompgsql - fix unsafe string copy in defaults
2017-12-10 18:02:12 +01:00
Dan Molik
d0064fdf3e ompgsql - fix unsafe string copy in defaults 2017-12-10 09:30:56 -05:00
Rainer Gerhards
444c30ff05 "fix" Coverity scan CID 185431 2017-12-10 15:07:11 +01:00
Jan Gerhards
effee21a81 rainerscript: implement substring function 2017-12-10 14:24:46 +01:00
Rainer Gerhards
e1230073ac
Merge pull request #2186 from jgerhards/errmsg-omkafka
omkafka: use new errmsg interface
2017-12-10 12:34:21 +01:00
Rainer Gerhards
96b08ec1b0 maintain ChangeLog 2017-12-09 18:14:24 +01:00
Rainer Gerhards
12bc21c2d4
Merge pull request #2183 from rgerhards/i-2132
imudp bugfix: potential segfault in ratelimiting
2017-12-09 18:13:11 +01:00
Rainer Gerhards
ce06bba15c RainerScript: implement previous_action_suspended() function
This function returns a boolean indicating if the previous action is
suspended (0 - no, 1 - yes). This is useful if arbitrary processing
(other than calling actions) should be made depending on that state.
A prime example for this is probably calling a ruleset.

closes https://github.com/rsyslog/rsyslog/issues/1939
2017-12-09 17:48:28 +01:00
Rainer Gerhards
19ff0136e1 maintain ChangeLog 2017-12-09 17:32:29 +01:00
Rainer Gerhards
2614b1803c
Merge pull request #2172 from GrayTShirt/pg
update postgres output module
2017-12-09 17:25:22 +01:00
Rainer Gerhards
4af883651e
Merge pull request #2185 from rgerhards/i-1978
RainerScript: add function script_error() and error-reporting support
2017-12-09 17:13:15 +01:00
Jan Gerhards
3f8c1c26cc omkafka: use new errmsg interface 2017-12-09 16:58:50 +01:00
Rainer Gerhards
b63d3051bc RainerScript: add function script_error() and error-reporting support
This permits script functions that could fail to report errors back, so
that the user can handle them if desired. We use an errno-style of
interface. That means script_error() needs to be called after functions
that supports it. It will return either 0 (all OK) or something else
(an error condition).

The commit also modifies the parse_time() function to use the new
interface. First of all, this is useful for users, and secondly we
needed a capability to craft a testbench test.

closes https://github.com/rsyslog/rsyslog/issues/1978
2017-12-09 16:08:36 +01:00
Dan Molik
f334e2b250 ompgsql plugin - update postgres module
The PostgreSQL output module was woefully out-of-date the following
list is changes made to update the module to current Rsyslog standards.

  - allow for v6 configuration syntax
  - configurable ports
  - support transactional interface
  - push db connection into workers (libpq is threadsafe)
  - enable module testing on travis
  - ensure configuration syntax backwards compatibility
  - formatting around postgres core templating
  - use new test conventions
  - add new configuration syntax test
  - add valgrind tests for new and old syntax
  - add threading tests
  - add action queue long running tests
  - add action queue valgrind test
2017-12-09 09:04:46 -05:00
Rainer Gerhards
6f4b651df1
Merge pull request #2182 from rgerhards/i-2170
testbench cleanup
2017-12-09 14:57:36 +01:00
Rainer Gerhards
ba89fd38ab testbench cleanup
closes https://github.com/rsyslog/rsyslog/pull/2170
2017-12-09 13:39:30 +01:00
Rainer Gerhards
8977d0b223 imudp bugfix: potential segfault in ratelimiting
The rate-limiter inside imudp was not set to be thread safe, but was
used across multiple threads. This worked in default configuration,
but failed when RepeatedMsgReduction was set to "on".
Note that it in general is a bug to use a rate-limiter in
non-threadsafe mode across multiple threads. This also causes invalid
rate limiting counts in the default case.

closes https://github.com/rsyslog/rsyslog/issues/441
fixes https://github.com/rsyslog/rsyslog/issues/2132
2017-12-09 11:26:08 +01:00
Rainer Gerhards
d0b4b078c8 maintain ChangeLog 2017-12-09 10:26:47 +01:00
Rainer Gerhards
0701dd0972
Merge pull request #2180 from rgerhards/cid-185877
core: refactor parent directory creation function
2017-12-09 10:25:19 +01:00
Rainer Gerhards
43f4910a3e
Merge pull request #2179 from rgerhards/raspbian-1
fix build issue on raspbian
2017-12-08 18:11:47 +01:00
Rainer Gerhards
b3fbedae2d core: refactor parent directory creation function
streamline code, also fix Coverity scan ID 185877
2017-12-08 16:16:20 +01:00
Rainer Gerhards
3c18216588 config processing: ensure proper alignment
This came up on arm (raspbian) build, but is probably the right thing
to do in any case!
2017-12-08 14:58:45 +00:00
Rainer Gerhards
17a39a3e9a fix build issue on raspbian 2017-12-08 13:38:57 +00:00
Rainer Gerhards
75db85955e maintain ChangeLog 2017-12-08 14:34:19 +01:00
Rainer Gerhards
92a7ccd65a
Merge pull request #2119 from rgerhards/i-1858
omprog plugin: argv[0] not set when using binary without arguments
2017-12-08 14:31:27 +01:00
Rainer Gerhards
57bd70326d omprog plugin: argv[0] not set when using binary without arguments
When using the omprog plugin with a binary without arguments, argv[0] (the
name of the binary) is not set, causing binaries that depend on this value
being set to crash or misbehave.

This patch also mildly refactors omprog argv[] creations, albeit some more
refactoring would be useful.

fixes https://github.com/rsyslog/rsyslog/issues/1858
2017-12-08 11:41:45 +01:00
Rainer Gerhards
e5150d4986
Merge pull request #2178 from rgerhards/travis-scan-build
Travis: fall back to older scan-build if 5.0 cannot be found
2017-12-08 11:16:08 +01:00
Rainer Gerhards
a730246385 Travis: (temoporarily) disable static analyzer as it does not work
can currently not obtain necessary packages from LLVM repo
2017-12-08 10:12:37 +01:00
Rainer Gerhards
5aa044e452
Merge pull request #2175 from jgerhards/errmsg-net
net: use new errmsg interface
2017-12-08 08:38:53 +01:00
Rainer Gerhards
41e8460d79
Merge pull request #2177 from jgerhards/errmsg-nsd_ptcp
nsd_ptcp: use new errmsg interface
2017-12-08 08:38:03 +01:00