10791 Commits

Author SHA1 Message Date
Rainer Gerhards
970dfa8cdb Merge pull request #1755 from rgerhards/i-1474
core: memory corruption during configuration parsing
2017-09-06 15:32:14 +02:00
Rainer Gerhards
5bbd0a4b3c core: memory corruption during configuration parsing
when omfwd is used with the $streamdriverpermittedpeers legacy
parameter, a memory corruption can occur. This depends on the
length of the provided strings and probably the malloc subsystem.

Once config parsing succeeds, no problem can happen.

Thanks to Brent Douglas for initially reporting this issue and
providing great analysis.
Thanks to github user bwdoll for analyzing this bug and providing
a suggested fix (which is almost what this commit includes).

closes https://github.com/rsyslog/rsyslog/issues/1408
closes https://github.com/rsyslog/rsyslog/issues/1474
2017-09-06 13:20:51 +02:00
Rainer Gerhards
26c3520ba2 maintain ChangeLog 2017-09-06 09:38:13 +02:00
Rainer Gerhards
9cb5c17b82 Merge pull request #1743 from wdauchy/es_contenttype_bulk
omelasticsearch: avoid ES5 warnings while sending json in bulkmode
2017-09-06 09:32:19 +02:00
Rainer Gerhards
2a6db20868 maintain ChangeLog 2017-09-06 08:42:22 +02:00
Rainer Gerhards
aa1bd5eb9c Merge pull request #1750 from rgerhards/i-1749
tcpsrv subsystem: better error messages
2017-09-06 08:37:12 +02:00
Rainer Gerhards
a04ceea971 Merge pull request #1744 from opoplawski/suspended
Also report module name when suspending action
2017-09-06 08:36:01 +02:00
Rainer Gerhards
93ddb4db62 maintain ChangeLog 2017-09-05 18:22:17 +02:00
Rainer Gerhards
3ea97166e5 Merge pull request #1747 from jvymazal/imjournal-systemd
switching to persistent journal possible without rsyslog restart,
2017-09-05 18:15:02 +02:00
Rainer Gerhards
c5a67641f2 Merge pull request #1724 from PascalWithopf/priorityString_test
imtcp: fix usage of priorityString
2017-09-05 18:11:41 +02:00
Rainer Gerhards
5c5a7a3ed5 tcpsrv subsystem: better error messages
Most importantly, output os error messages on API failures.
Among others, this improves error messages in imtcp.

closes https://github.com/rsyslog/rsyslog/issues/1749
2017-09-05 15:47:12 +02:00
Rainer Gerhards
920c296bf9 maintain ChangeLog 2017-09-05 15:46:49 +02:00
Rainer Gerhards
2c30a2fb38 Merge pull request #1752 from rgerhards/mutWtp
core bugfix: race on worker thread termination
2017-09-05 15:45:02 +02:00
Jiri Vymazal
92ac8016e4 Made switching to persistent journal in runtime possible,
now you can continue logging after switch to persistent
journal without need to restart rsyslog service.
Bumped correspondidng systemd version dependency.
2017-09-05 14:12:31 +02:00
PascalWithopf
56e3132320 imtcp bugfix: priorityString was not set
The variable priorityString was not used when rsyslog acted as the
server and the defaults were always set. Now the priorityString
is used when specified.

fixes https://github.com/rsyslog/rsyslog/issues/1722
2017-09-05 11:19:29 +02:00
Rainer Gerhards
1d9a33beee core bugfix: race on worker thread termination
The testbench got some occasionally failing tests. Review of
them brought up the idea that there is a race during worker
threat termination. Further investigation showed that this
might be a long-standing issue, but so far did not really
surface as the timing was almost always correct. However,
with the new functionality to emit a message on worker
shutdown (v8.29), the timing got more complex and now this
seemed to occasionally surface.

closes https://github.com/rsyslog/rsyslog/issues/1754
2017-09-05 10:43:51 +02:00
Rainer Gerhards
33826285dd maintain ChangeLog 2017-09-05 10:24:21 +02:00
Rainer Gerhards
c22e2d18d4 Merge pull request #1726 from PascalWithopf/i-1718
imptcp/imtcp: include module name in error msg
2017-09-05 10:17:16 +02:00
Rainer Gerhards
b3f203675a Merge pull request #1748 from jgerhards/ipv6_mmanon
mmanon: add support for ipv6
2017-09-05 10:12:55 +02:00
Rainer Gerhards
ae86d6802e maintain ChangeLog 2017-09-04 11:30:45 +02:00
Rainer Gerhards
22e56cd506 Merge pull request #1732 from vquemener/master
Fix Elasticsearch response handling
2017-09-04 11:25:36 +02:00
Rainer Gerhards
b73c51f624 maintain ChangeLog 2017-09-04 08:27:00 +02:00
Rainer Gerhards
952459bd90 Merge pull request #1725 from petiepooo/imptcp-fix-cntr-mut
correct mutex arg in imptcp
2017-09-04 08:16:41 +02:00
Rainer Gerhards
b9a5ca7f3a Merge pull request #1737 from jgerhards/i1736
core bugfix: cosmetic memory leak
2017-09-04 08:14:47 +02:00
Rainer Gerhards
53fbd50308 Merge pull request #1739 from jgerhards/rewrie-mmanon
mmanon: rewrite ipv4-anonymization
2017-09-04 08:09:32 +02:00
Jan Gerhards
f9ba3dbe52 mmanon: add support for ipv6
see also https://github.com/rsyslog/rsyslog/issues/1723
closes https://github.com/rsyslog/rsyslog/issues/1614
2017-09-02 11:53:57 +02:00
Vincent Quéméner
75c2bfbc79 Fix Elasticsearch response handling
Elasticsearch responses for bulk requests differ slightly between
versions <= 2.4 and more recent ones (5 and upwards).

As a matter of fact, they used to look like this for version 2.4 :
'{
    "took":1205,
    "errors":false,
    "items":[{
        "create":{
            "_index":"log-2017.08.25",
            "_type":"log",
            "_id":"AV4JLGyt91GzIgdyx6s7",
            "_version":1,
            "_shards":{
                "total":2,
                "successful":1,
                "failed":0
            },
            "status":201
        }
    }]
}'

Whereas they now look like this, starting from version 5 (there was no
version between 2.4 and 5):

'{
    "took":1829,
    "errors":false,
    "items":[{
        "index":{
            "_index":"log-2017.08.25",
            "_type":"log",
            "_id":"AV4JPZ_fquWCvYqrs7tN",
            "_version":1,
            "result":"created",
            "_shards":{
                "total":2,
                "successful":1,
                "failed":0
            },
            "created":true,
            "status":201
        }
    }]
}'

Note that the main difference is that the object "create" was renamed as
"index".

So far, the code was looking for the key "status" of this object
"create". This commit make it so that it now also tries to find the
object "index" if the object "create" does not exist.

Fixes #1731
2017-08-31 10:33:12 +02:00
Orion Poplawski
481927ff78 Also report module name when suspending action 2017-08-30 10:57:22 -06:00
William Dauchy
50d8e5cb39 omelasticsearch: avoid ES5 warnings while sending json in bulkmode
my original patch attented to fix an deprecation warnings while sending
json related to content type.
I however wanted to improve my commit and support the mentioned x-ndjson
content type in case of bulk mode.
see
https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html

However, firstly my patch was wrong, since, in bulk mode, the x-ndjson was
set even for connection checks. Secondly I discovered that ES community
kind of disagree of what is the correct behavior:
 in RFC 6648 the x- prefix is already decided as "deprecated"
see https://github.com/elastic/elasticsearch/issues/25718

So I decided to put only application/json as content type; it is
supported for both simple request or bulk requests containing multiple
json. We can improve it when there is a final decision about it.

Re-Fixes: #1642
Fixes: commit 462be8b2ee4 (omelasticsearch: avoid ES5 warnings while sending json)
Signed-off-by: William Dauchy <w.dauchy@criteo.com>
2017-08-30 16:42:00 +02:00
Jan Gerhards
21d64f3e8a mmanon: rewrite ipv4-anonymization
for more information, see https://github.com/rsyslog/rsyslog/issues/1723

closes https://github.com/rsyslog/rsyslog/issues/1717
closes https://github.com/rsyslog/rsyslog/issues/1720
2017-08-24 10:48:34 +02:00
Jan Gerhards
000d55910e core bugfix: cosmetic memory leak
closes https://github.com/rsyslog/rsyslog/issues/1736
2017-08-23 10:06:14 +02:00
PascalWithopf
a10744ce2a imtcp: include name of action in error msg 2017-08-21 16:02:12 +02:00
Rainer Gerhards
1e07622112 Merge pull request #1712 from jgerhards/trim
Rainerscript: add ltrim and rtrim functions
2017-08-21 14:34:47 +02:00
Rainer Gerhards
d9648779ee Merge pull request #1710 from jgerhards/i1708
omuxsock: Fix error reporting and remove incorrect comment
2017-08-21 14:34:23 +02:00
Rainer Gerhards
5b897a5814 Merge pull request #1715 from jasssonpet/patch-1
Fix typos in plugins/external docs
2017-08-19 11:22:26 +02:00
PascalWithopf
842df12678 imptcp: include name of action in error msg
closes https://github.com/rsyslog/rsyslog/issues/1718
2017-08-17 12:08:36 +02:00
Rainer Gerhards
3d7fde09db Merge pull request #1727 from jbd/patch-1
Typo correction
2017-08-17 11:42:13 +02:00
jbd
c08ba60b17 Typo correction 2017-08-17 11:38:06 +02:00
Pete Nelson
2ea84c47b2 correct paste oversight on mutex arg
Remove the 'pThis->' from the second argument to STATSCOUNTER_INC macro.
This only affects architectures without atomic uint64 actions, like aarm64.
Others do not use the mut argument, and it gets compiled out.
2017-08-16 17:19:33 -04:00
Jan Gerhards
994561f8bf testbench: add test for ltrim and rtrim functions 2017-08-14 14:31:15 +02:00
Jason Zhekov
b7f5729890 Fix typos in plugins/external docs 2017-08-10 13:31:24 +03:00
Jan Gerhards
0abf897e52 rainerscript: add functions lTrim and rTrim
closes https://github.com/rsyslog/rsyslog/issues/1711
2017-08-09 15:45:30 +02:00
Jan Gerhards
87d1f9a963 omuxsock bugfix: error reporting, remove incorrect comment
fixed a bug causing incorrect debug output. Thanks
to etainativ for the fix-suggestion.
Also removed an incorrect comment (copy-paste error).

closes https://github.com/rsyslog/rsyslog/issues/1708
2017-08-09 13:29:51 +02:00
Rainer Gerhards
5ffa5114a1 bump version for next release cycle 2017-08-08 17:15:55 +02:00
Rainer Gerhards
3056a16c07 Merge branch 'master' into v8-stable v8.29.0 2017-08-08 16:50:02 +02:00
Rainer Gerhards
72ed3475be maintain ChangeLog 2017-08-08 16:49:40 +02:00
Rainer Gerhards
cbd00f8e2d Merge pull request #1707 from PascalWithopf/i-1093
omfwd, imtcp: add possibility to use priority string
2017-08-08 16:48:02 +02:00
PascalWithopf
717092d93e gnutls: add possibility to use priority string 2017-08-08 14:57:15 +02:00
Rainer Gerhards
c4ba96f621 prepare for 8.29.0 release 2017-08-08 14:39:34 +02:00
Rainer Gerhards
e81a0cf153 maintain ChangeLog 2017-08-08 14:36:28 +02:00