10075 Commits

Author SHA1 Message Date
Rainer Gerhards
99aecbdb85 testbench: add test for object persisting
see also https://github.com/rsyslog/rsyslog/issues/1239
2016-11-03 10:43:56 +01:00
Rainer Gerhards
a69ced1131 maintain ChangeLog 2016-11-03 10:43:25 +01:00
Rainer Gerhards
ce3519b316 Merge pull request #1241 from rgerhards/i-1239
bugfix: abort when persisting object state
2016-11-03 10:41:46 +01:00
Rainer Gerhards
d93fe1af36 bugfix: abort when persisting object state
This causes a segfault. It happens whenever an object state larger
than 4095 byte is persisted. Then, incorrectly a try to rollover to
a new state file is tried, which will lead to a division by zero
as the necessary variables for this operation are not set because we
are NOT in circular mode.

This problem can happen wherever state files are written. It has been
experienced with imfile and queue files.

Many thanks to github user mostolog for his help in reproducing the
issue, which was very important to finally nail down this long-standing
bug.

closes https://github.com/rsyslog/rsyslog/issues/1239
closes https://github.com/rsyslog/rsyslog/issues/1162
closes https://github.com/rsyslog/rsyslog/issues/1074
2016-11-02 18:59:23 +01:00
Rainer Gerhards
aeb77e4d2d maintain ChangeLog 2016-11-01 14:34:44 +01:00
Rainer Gerhards
452015d029 Merge pull request #1234 from rgerhards/fix-warnings
omelasticsearch: tries to modify constant memory under some circumsta…
2016-11-01 14:32:32 +01:00
Rainer Gerhards
aff40b570a travis: run elasticsearch tests in debug mode as well 2016-11-01 13:29:09 +01:00
Rainer Gerhards
f8e2b4b422 omelasticsearch: tries to modify constant memory under some circumstances
Function computeBaseUrl may modify its serverParam parameter, but
this may contain the constant string "localhost". Depending on the
platform, this can lead to a segfault.

Noticed while working on compiler warnings, not seen in practice.

closes https://github.com/rsyslog/rsyslog/issues/1233
2016-11-01 13:29:00 +01:00
Rainer Gerhards
1ab0d897a4 Merge pull request #1220 from rgerhards/i-1219
remove "inline" attribute from excessivly long functions
2016-10-26 16:11:02 +02:00
Rainer Gerhards
974ec81df2 maintain ChangeLog 2016-10-26 16:10:23 +02:00
Rainer Gerhards
0a838d8d32 Merge pull request #1223 from rgerhards/merge-1216
Merge #1216
2016-10-26 16:08:26 +02:00
Rainer Gerhards
a31015abe2 template emergency json escaping: use slash instead of backslash
This is only triggered if we do not get memory to do proper escaping,
so this code is unlikely to be executed. However, we think that
forwards slash is a better susbstitute for backslash than is the
single quote char.
2016-10-26 11:59:38 +02:00
Rainer Gerhards
b0dc6c16f2 fix json template encoding (correct predicate check)
commit 27af112637b47fd80c9ffb80565e61e049b88774 tried to fix
json encoding, but introduced an invalid predicate check that
lead to no encoding at all.

see also https://github.com/rsyslog/rsyslog/pull/1216
2016-10-26 11:54:29 +02:00
Rainer Gerhards
448f16495c remove "inline" attribute from excessivly long functions 2016-10-26 11:50:15 +02:00
Rainer Gerhards
8e448d4f58 testbench: add test for json formatting in templates 2016-10-26 11:21:43 +02:00
Rainer Gerhards
2566332aca Merge branch 'fix1211' of https://github.com/mostolog/rsyslog into merge-1216 2016-10-26 11:09:22 +02:00
Rainer Gerhards
4a8ec99192 maintain ChangeLog 2016-10-26 11:01:02 +02:00
Rainer Gerhards
7a930d791b Merge pull request #1210 from rgerhards/i-1209
rsyslog.conf: add ability to set environment variables
2016-10-26 10:58:36 +02:00
Rainer Gerhards
a35340bff9 maintain ChangeLog 2016-10-26 10:57:31 +02:00
Rainer Gerhards
73abfaa188 Merge pull request #1222 from alorbach/ksi-i1206
Ksi i1206
2016-10-26 10:52:17 +02:00
23019616b4 rsgtutil: Fixed adding 0 byte to constrain oid and value helper variables 2016-10-25 12:37:50 +02:00
usuario
27af112637 Modified template to add "\\" on doEscape for JSON_ESCAPE fixing #1126 2016-10-24 22:00:14 +02:00
2ce5557502 testsuite: Added tests for rsgtutil ksi verify cnstr options 2016-10-24 16:28:18 +02:00
99832e7626 rsgtutil: Added Option to specify KSI publications certificate constraints
closes: https://github.com/rsyslog/rsyslog/issues/1207
2016-10-24 16:00:36 +02:00
d6c7d209b0 libksi: Fixed adding LOGSIG Fileheader if an empty ksisig file already exists
When previous signing failed, the newly created ksisig file is empty.
This has been fixed now. However if a logfile previously existed, the signature
verification process with fail because signatures for the loglines before
are missing. This problem needs to be evaluated in another issue.

closes https://github.com/rsyslog/rsyslog/issues/1206
2016-10-24 13:10:13 +02:00
Rainer Gerhards
2f119e426b testbench: add tests for new "environment" global parameter 2016-10-22 11:25:52 +02:00
Rainer Gerhards
61c401a982 rsyslog.conf: provide a capability to set environment variables
We should provide a vehicle to set environment variables via the
config file. This is most importantly for things like HTTP_PROXY.
Currently, to do this system startup files need to be modified,
which is cumbersome and different from platform to platform.

closes https://github.com/rsyslog/rsyslog/issues/1209
2016-10-20 15:22:43 +02:00
Rainer Gerhards
bcbda82493 Merge pull request #1173 from rgerhards/i-1162
imfile: abort in stream handler
2016-10-20 12:24:03 +02:00
Rainer Gerhards
2484a636cc maintain ChangeLog 2016-10-20 09:26:14 +02:00
Rainer Gerhards
476912dcf5 Merge pull request #1196 from barakshechter/barakshechter/omelasticsearch-ha-server-config
omelasticsearch high availability addressing of ElasticSearch cluster
2016-10-20 09:25:00 +02:00
Rainer Gerhards
a9e2a14800 doc: mention that developers should not build with adiscon repo 2016-10-20 09:23:56 +02:00
Rainer Gerhards
9f3e35495a Merge pull request #1203 from mostolog/patch-1
Update README.md
2016-10-20 09:20:51 +02:00
Barak Shechter
4c01054c3c Adding test with singleton server, fix indentation 2016-10-19 21:06:40 -04:00
Rainer Gerhards
592bca81ac maintain ChangeLog 2016-10-19 13:02:40 +02:00
Rainer Gerhards
0b7424887e Merge pull request #1204 from rgerhards/merge-partial-1074
Partial Merge of #1074
2016-10-19 13:01:13 +02:00
mostolog
ce5d506d8e Update README.md 2016-10-18 16:03:45 +02:00
Rainer Gerhards
6efd4e3de2 core/stream.c: do not access private members without need 2016-10-18 15:56:49 +02:00
kordex
4af7e06166 core/stream.c: very, very slightly speed up multiline reads 2016-10-18 15:55:34 +02:00
Rainer Gerhards
4a578d3552 bugfix: theoretical queue file corruption when more than MAX_INT files
This also corrects some code areas that needed to be adapted to the
data type change done in the previous commit.

closes https://github.com/rsyslog/rsyslog/issues/1202
2016-10-18 15:48:15 +02:00
kordex
ed37e8b6de core: fix potential negative file numbers for queue files 2016-10-18 13:04:23 +02:00
Rainer Gerhards
d099a74108 ChangeLog: correct contributor name (sorry!) 2016-10-18 08:52:47 +02:00
Rainer Gerhards
4324009217 maintain ChangeLog 2016-10-17 17:18:52 +02:00
Rainer Gerhards
aac5886c93 Merge pull request #1197 from janmejay/lookup_table_init_error_check_and_prifilt_init_fix
Lookup table init error check and prifilt init fix
2016-10-17 17:16:41 +02:00
Rainer Gerhards
f589f99871 Merge pull request #1195 from rgerhards/i-1188
Fix issues with rsyslog internal messages in default mode
2016-10-15 17:11:46 +02:00
Janmejay Singh
1320d5ac24 Initialize func-data(and to-be-freed flag) correctly for prifilt function-node (identified in valgrind run in issue #1071), it is almost definitely independent of the problem that user observed, but is a low-value bug anyway. 2016-10-14 16:10:57 +05:30
Barak Shechter
538049640b Fixed a format spec 2016-10-14 06:18:35 -04:00
Barak Shechter
96b5fce0ac Resolves #1171 omelasticsearch high availability addressing of ElasticSearch cluster
Changing server parameter to accept an array of servers/uris and port to
defaultPort if not specified on a given uri. Adding dedicated curl handle
for checkConn and refactoring the curl setup a bit, using ES health check
with timeout. Added checkConnFailure stat counting and HA test
2016-10-14 05:58:49 -04:00
Rainer Gerhards
b794b6c386 imuxsock: do not drop messages from our own pid if we log to syslog()
On non-systemd journal systems, rsyslog messages generated from the
same instance that reads the system log socket are ignored by default.
This is because imuxsock by default ignores messages from its own
process. This makes sense if messages are internally processed,
but does not make sense if the shall go via the syslog call.

This is a longer standing issue, but became more important starting
with 8.21, which logs to syslog by default.

closes https://github.com/rsyslog/rsyslog/issues/1194
2016-10-14 09:40:42 +02:00
Rainer Gerhards
fdd9de9626 bugfix: potential hang on rsyslog startup
When we log internal messages to syslog (the default starting with 8.21),
early error messages can result in rsyslogd hanging, as well as everything
else that wants to log hanging.

This is the result of deadlock: rsyslog tries to write to the log socket,
which blocks but can't be unblocked as rsyslog processing would need to
advance to do so. Interestingly, this only happens occasionally (even
though the startup sequence is deterministic at this point), so it is
hard to diagnose. Also, not all platforms seem to be affected. Platforms
with systemd journal will never run into a deadlock (as journal in this
case reads the system log socket).

The root cause is that for internal messages we maintain a queue for
such early messages and emit them only after full startup. Similar code
is missing when writing to the log socket. The full code has been
restructured so that this condition is obeyed under all conditions.

closes https://github.com/rsyslog/rsyslog/issues/1188
2016-10-14 09:13:55 +02:00
Janmejay Singh
d9a182589e error check lookup table initialization (improves initialization error checking rigour) 2016-10-14 02:08:41 +05:30