14459 Commits

Author SHA1 Message Date
Rainer Gerhards
dd2e83f8da
Merge pull request #4136 from julthomas/dev/jth/ompipe-resume
ompipe: add action parameter tryResumeReopen
2020-05-12 13:08:03 +02:00
Rainer Gerhards
5cc0a3fa3a
maintain ChangeLog 2020-05-12 12:53:15 +02:00
Rainer Gerhards
0ae9a7a3d0
Merge pull request #4193 from jmarckel/bugfix/bug_2133
imjournal: remove strcat call
2020-05-12 12:51:10 +02:00
Rainer Gerhards
4214857ae8
maintain ChangeLog 2020-05-12 12:43:23 +02:00
Rainer Gerhards
df05750a31
Merge pull request #4276 from rgerhards/i3957
build system: libzcmq version requirement needs to be bumped
2020-05-12 12:41:42 +02:00
Rainer Gerhards
75ea876160
Merge pull request #4277 from rgerhards/fix-es-download
CI: fix problems with ElasticSearch download
2020-05-12 12:26:08 +02:00
Rainer Gerhards
da7ca37c10 CI: fix problems with ElasticSearch download
ElasticSearch can no longer be reliably downloaded, we receive error
451 - prohibited for legal reasons. This causes false positive test
failures.

We have solved this by moving the required tarballs to rsyslog.com and
download them now from there.
2020-05-12 11:09:42 +02:00
Rainer Gerhards
572ee0a6fd
build system: libzcmq version requirement needs to be bumped
Thanks to Thomas Deutschmann for pointing this out.

closes https://github.com/rsyslog/rsyslog/issues/3957
2020-05-12 09:50:15 +02:00
Rainer Gerhards
8d86bc788d
maintain ChangeLog 2020-05-11 13:01:21 +02:00
Rainer Gerhards
4982146186
Merge pull request #4215 from M1cha/fix-ossl-ctx-leak
openssl tls: stop leaking ctx
2020-05-11 12:59:37 +02:00
Rainer Gerhards
c54e346320
maintain ChangeLog 2020-05-11 12:15:08 +02:00
Rainer Gerhards
6aed1b4975
Merge pull request #4219 from callmegar/master
omhttp: Adding multiple http headers capability
2020-05-11 12:12:55 +02:00
Rainer Gerhards
36725afe2c
Merge pull request #4256 from jsiwrk/feature/adapt_omprog_test
omprog: adapt test to testbench improvements
2020-04-29 17:35:00 +02:00
Rainer Gerhards
f0d71ce408
Merge pull request #4263 from alorbach/pr-issue-4131
SKIP librelp tlscmd tests if librelp was build without openssl support
2020-04-29 13:29:15 +02:00
Rainer Gerhards
5e3062f0a1
maintain ChangeLog 2020-04-29 12:18:33 +02:00
Rainer Gerhards
c19ced9664
Merge pull request #4246 from emilbart/fileGroup_error
rainerscript: call getgrnam_r repeatedly to get all group members
2020-04-29 12:14:51 +02:00
Rainer Gerhards
589eac07b2
Merge pull request #4240 from alorbach/pr-issue-4005
testbench: Add test for imrelp to check broken session handling.
2020-04-29 12:03:16 +02:00
Rainer Gerhards
67934f1feb
Merge pull request #4254 from alorbach/pr-issue-4238
omudpspoof: Fixed issues with oversized messages (Exceeding the configured MTU setting).
2020-04-29 11:42:50 +02:00
Rainer Gerhards
6fc5c039f8
Merge pull request #4261 from jsiwrk/bugfix/omprog_output_assert_failed
omprog: fix assert failed on HUP with output flag
2020-04-29 11:19:43 +02:00
15f5a1bda2 SKIP librelp tlscmd tests if librelp was build without openssl support
closes https://github.com/rsyslog/rsyslog/issues/4131
2020-04-29 09:26:25 +02:00
Joan Sala
0e49c8d1f8 omprog: fix assert failed on HUP with output flag
If the 'output' setting of omprog was used and rsyslog received a HUP
signal just after starting (and before the omprog action received the
first log to process), an internal assertion could fail, causing
rsyslog to terminate. The failure message was "rsyslogd: omprog.c:660:
closeOutputFile: Assertion `pCtx->bIsRunning' failed."

The failure could also occur if rsyslog received a HUP signal during
the shutdown sequence.

This bug was introduced in v8.2004 by PR #4255.

Although a test already existed that checked the interaction of HUPs
with the 'output' setting, it didn't always fail in this particular case
due to timing conditions. The test has been improved to cover this case
more reliably.
2020-04-29 01:18:25 +02:00
Joan Sala
abc2f83943 omprog: adapt test to testbench improvements
Adapt one of the omprog tests to the latest improvements in the
testbench framework, for consistency with other similar tests. The test
behaviour has not changed.

Add some temporary files created by the testbench to gitignore file.
2020-04-28 21:04:15 +02:00
Rainer Gerhards
d284b449a8
bump version number for next devel cycle 2020-04-28 13:28:42 +02:00
Rainer Gerhards
23276750de
prepare for 8.2004.0 scheduled stable release v8.2004.0 2020-04-28 13:17:55 +02:00
Rainer Gerhards
995ade76f7
maintain ChangeLog 2020-04-28 13:13:01 +02:00
Rainer Gerhards
6b56e0418e Merge branch 'sudden-ksi-module-closure-fix' 2020-04-28 13:11:22 +02:00
Rainer Gerhards
d057a69fe5
maintain ChangeLog 2020-04-28 12:40:03 +02:00
Rainer Gerhards
80c6be0c47
Merge pull request #4211 from taavi-valjaots/default-hash-algo-fix
Hardcoded default hash algorithm KSI_HASHALG_SHA2_256 replaced with
2020-04-28 12:28:52 +02:00
Rainer Gerhards
b74a14a9cd
Merge pull request #4218 from taavi-valjaots/signer-thread-init-fix
ksi bugfix: Signer thread initialization is verified before usage.
2020-04-28 12:03:47 +02:00
Rainer Gerhards
45ed2605d5
maintain ChangeLog 2020-04-28 11:13:34 +02:00
Rainer Gerhards
38861e838a
Merge pull request #4228 from jaankit/rsyslog-stream
stream: Fix for segfault on imfile read
2020-04-28 10:48:42 +02:00
Rainer Gerhards
30dc2546be
Merge pull request #4225 from alorbach/pr-issue-4224
ossl: setting SSL_MODE_AUTO_RETRY on ssl objects returned by SSL_new
2020-04-28 10:38:06 +02:00
Rainer Gerhards
626f896229
Merge pull request #4255 from jsiwrk/bugfix/omprog_bad_fds
omprog: fix bad fd errors in daemon mode
2020-04-28 10:30:32 +02:00
Rainer Gerhards
686835c880
Merge pull request #4234 from alorbach/pr-issue-4233
stream.c: Moved doSizeLimitProcessing check to strmWrite
2020-04-28 10:26:57 +02:00
3c0f642740 omudpspoof: Fixed issues with oversized messages
First issue was an incorrect packet length in UDP Header. It has to be the FULL UDP Packet
regardless of the MTU Setting. As a result regardless of IP fragmentation, the MTU setting
also limited the siizmax size of the UDP message.

The second issue was incorrect calculation of the UDP Checksum with libnet if
IP fragmentation was used (Based on MTU Setting). As a result, the network packets were
dropped by the tcp stack before they even could reach there target. The workarround for this
problem is, that we set the UDP Checksum to 0x0000 which allows skipping of the checksum
test. Fixing the problem by calculating the correct UDP Checksum would require some
code changes in the libnet.

Also fixed the omudpspoof bigmsg test and increased the testing size to 16KB.
2020-04-27 11:13:24 +02:00
e2a9e3da2d omudpspoof: Added test for oversized UDP messages (above 1500 MTU) 2020-04-27 11:13:24 +02:00
baee0bd542 testbench: Add test for imrelp to check broken session handling.
For successfull test, the PR
https://github.com/rsyslog/librelp/pull/184
 for Issue
https://github.com/rsyslog/librelp/issues/183
is needed. Otherwise the test will trigger a double free inside
librelp which results in a segfault in some cases.

closes: https://github.com/rsyslog/rsyslog/issues/4184
closes: https://github.com/rsyslog/rsyslog/issues/4005
2020-04-27 10:55:50 +02:00
Rainer Gerhards
ddbaa2c627
Merge pull request #4258 from rgerhards/travis-hotfix
Travis: something is wrong with Travis, this just makes it non-fail
2020-04-27 10:05:16 +02:00
Rainer Gerhards
c922bc3049
Travis: something is wrong with Travis, this just makes it non-fail
This is not a proper solution, but keeps rsyslog CI erroring out on
every run due to Travis issue. We didn't change anything, but somehow
Travis now runs only a subset of tests and fails on some others. This
needs to be investigated.
2020-04-27 09:32:44 +02:00
Joan Sala
fc263cb3f9 omprog: fix bad fd errors in daemon mode
When omprog was used with the 'forceSingleInstance=on' option, and/or
the 'output' setting, "bad file descriptor" errors occurred, which
prevented the external program to be executed and/or the program output
to be correctly captured. The bug could also manifest as "resource
temporarily unavailable" errors, or other errors related to the use of
invalid/reassigned file descriptors. These errors only happened when
rsyslog ran in daemon mode (i.e. they didn't happen if rsyslogd was
run with the '-n' option).

The cause of the bug was that omprog opened the pipe fds needed by
these flags during the configuration load phase (in the 'newActInst'
module entrypoint). This is a bad place since the fork of the daemon
occurs after this phase, and all fds are closed when the daemon process
is started (see 'initAll' in rsyslogd.c), hence invalidating the
previously opened fds.

To correct this, the single child process and the output capture thread
are now started later, when the first log message is received by the
first worker thread. (Note: the 'activateCnf' module entrypoint, despite
being invoked after the fork, cannot be used for this purpose, since it
is invoked per module, not per action instance.)

Currently no automated test exists for this use case since the testbench
always runs rsyslog in non-daemon mode.

Affected versions: v8.38 and later

Closes #4247
2020-04-25 16:23:55 +02:00
Rainer Gerhards
6ce067a490
Merge pull request #4253 from rgerhards/tb-kafka-update
testbench tooling: update kafka components
2020-04-24 18:33:34 +02:00
Rainer Gerhards
02e5cbee91
testbench tooling: update kafka components
those used so far are outdated, bump to newest version
2020-04-24 08:53:17 +02:00
Rainer Gerhards
c0db652b50
maintain ChangeLog 2020-04-17 10:33:53 +02:00
Rainer Gerhards
b7648bbcfa
Merge pull request #4213 from alorbach/pr-issue-4210
openssl: add check for LIBRESSL
2020-04-17 09:45:25 +02:00
Emil Bartczak
052d6f9d6b rainerscript: call getgrnam_r repeatedly to get all group members 2020-04-14 12:27:24 +02:00
b84c9debea stream.c: Moved doSizeLimitProcessing check to strmWrite
The check was done in strmPhysWrite before which caused syslog
messages to split in the middle if the syslog message batch exceeded
the default IO Buffer size.

closes: https://github.com/rsyslog/rsyslog/issues/4233
2020-03-31 17:27:01 +02:00
993569353a ossl: setting SSL_MODE_AUTO_RETRY on ssl objects returned by SSL_new
Older OpenSSL Versions do not have SSL_MODE_AUTO_RETRY enabeld by default.
If the setting is set to OFF, SSL_read can return an error with
SSL_ERROR_WANT_READ when a non-application data record has been processed.

For more see: https://www.openssl.org/docs/man1.1.1/man3/SSL_read.html

closes: https://github.com/rsyslog/rsyslog/issues/4224
2020-03-19 13:34:14 +01:00
Ankit Jain
ea96f4c99a stream: Fix for segfault on imfile read
- if cstrLen(pThis->prevMsgSegment) > maxMsgSize then len calculation
  become negative if cstrLen(thisLine) < cstrLen(pThis->prevMsgSegment)
  This causes illegal access to memory location and thus causing segfault.
- assigning len = 0 if cstrLen(pThis->prevMsgSegment) > maxMsgSize so that
  it access the correct memory location.

Signed-off-by: Ankit Jain <ankitja@vmware.com>
2020-03-19 12:01:53 +05:30
Rodriguez,German J
95e830cc22
omhttp: Adding multiple http headers capability 2020-03-17 20:12:10 -05:00
taavi.valjaots
7211b6aac4 ksi bugfix: Signer thread initialization is verified before usage.
When signer thread is created in rsksiInitModule thread successful
initialization is verified before returning the function. This will
prevent adding records to not initialized module and in case of an
error signature files opened will contain only magic bytes.

Thread flags replaced with thread state.

When init module fails, module is disabled.
2020-03-12 15:21:02 +02:00