15342 Commits

Author SHA1 Message Date
Rainer Gerhards
1acf1593af
maintain ChangeLog 2023-01-02 10:20:18 +01:00
Rainer Gerhards
5f8eafa0bd
Merge pull request #5052 from rgerhards/i5050
core bugfix: template system may generate invalid json
2023-01-02 10:19:03 +01:00
Rainer Gerhards
e6f1866f55
testbench: add test for invalid json template generation
see also: commit 246b8d8553b6880146d6c489a28cf4bacea8a199
see also: https://github.com/rsyslog/rsyslog/pull/5050
see also: https://github.com/rsyslog/rsyslog/pull/5052
2022-12-30 17:57:13 +01:00
Rainer Gerhards
246b8d8553
core bugfix: template system may generate invalid json
When
- a list template
- is created with option.jsonf="on"
- and the last list element is a property with onEmpty="skip"
- and that property is actually empty
invalid JSON is generated.

The JSON string in this case ends with ", " instead of "}\n". This
patch fixes the issue.

closes https://github.com/rsyslog/rsyslog/issues/5050
2022-12-30 17:13:17 +01:00
Flos Lonicerae
4c5ce90e7c Fixed wrong type conversion in cstrLen() 2022-12-28 12:38:30 +08:00
Rainer Gerhards
3b73e9ff26
Merge pull request #5040 from mbiebl/typo-fixes
Fix typos spotted by lintian
2022-12-10 11:18:06 +01:00
LGTM Migrator
8fde95fbcf
Add CodeQL workflow for GitHub code scanning 2022-12-08 16:52:39 +00:00
Michael Biebl
9b6cd6649b Fix typos spotted by lintian
I: rsyslog: typo-in-manual-page explicitely explicitly [usr/share/man/man5/rsyslog.conf.5.gz:225]
I: rsyslog: typo-in-manual-page sevrity severity [usr/share/man/man5/rsyslog.conf.5.gz:223]
2022-12-07 17:47:25 +01:00
Rainer Gerhards
62651b80e6
bump release number for new schedule stable cycle 2022-12-06 09:56:14 +01:00
Rainer Gerhards
8cc0c25edf
prepare for new scheduled stable release 8.2212.0 v8.2212.0 2022-12-05 16:02:44 +01:00
Rainer Gerhards
1d126ecedc
maintain ChangeLog 2022-12-05 15:58:22 +01:00
Rainer Gerhards
c8e0537e83
Merge pull request #5039 from rgerhards/testbench-py-server
testbench: make python http server based tests more reliable
2022-12-05 15:54:16 +01:00
Rainer Gerhards
e6c6491a9c
maintain ChangeLog 2022-12-05 11:08:18 +01:00
Rainer Gerhards
8f22e3b012
Merge pull request #5038 from rgerhards/i4967
omprog bugfix: invalid status handling at called program startup
2022-12-05 11:05:49 +01:00
Rainer Gerhards
2975a093ad
testbench: make python http server based tests more reliable
Harden them against races during server port assignment. Prevents
testbench flakes.
2022-12-05 11:03:34 +01:00
Sergey Kacheev
fcf72d6ac5 imfile: fix ext directory's fd leak in case of inotify on symlink 2022-12-05 12:36:19 +07:00
Sergey Kacheev
e8ac82e09f imfile tests: ext directory's fd leak in case of inotify on symlink 2022-12-05 12:35:33 +07:00
Rainer Gerhards
1128d32075
omprog bugfix: invalid status handling at called program startup
There is a bug when external program *startup* does not return "OK". This
can also lead to a misadressing with potentially a segfault (very unlikely).
Note that no problem exists once the initializiation phase of the external
program is finished and regular message transfer runs.

The problem basically is that for a startup failure, the control data for
that external program instance is freed on error. Unfortunately, that state
data is needed later on to detect a suspended instance. We now keep the control
data even on init failure (as we then need to do normal control options).

closes https://github.com/rsyslog/rsyslog/issues/4967
2022-12-04 16:05:22 +01:00
Rainer Gerhards
e77767e1ca
maintain ChangeLog 2022-11-29 15:29:06 +01:00
Rainer Gerhards
d2e71ae0d6
Merge pull request #5032 from rgerhards/pr4473
testbench: fix the wrong message injection object of instance 1
2022-11-29 15:26:05 +01:00
Guodong Zhu
18a824ca2f
testbench: fix the wrong message injection object of instance 1
In some client-server test cases, messages are supposed to be injected into
the instance 2(client), but they are actually injected into instance 1(server),
which may lead to false negative results. This patch fixed it by replacing
'injectmsg' with 'injectmsg2', and dealt with some minor issues.
2022-11-23 12:28:15 +01:00
Rainer Gerhards
0543d22c7c
Merge pull request #5031 from alorbach/pr-issue-5025b
imkafka: fix building imkafka with static librdkafka
2022-11-22 10:50:02 +01:00
2944d5f6a1 imkafka: fix building imkafka with static librdkafka
see also https://github.com/rsyslog/rsyslog/issues/5025
2022-11-22 09:16:29 +01:00
Rainer Gerhards
a3e4fc533b
maintain ChangeLog 2022-11-21 13:05:21 +01:00
Rainer Gerhards
5aa51642cb
Merge pull request #5028 from rgerhards/man-fix
rsyslog.conf man page bugfix: description of selectors
2022-11-21 13:00:54 +01:00
Rainer Gerhards
b12d81291d
rsyslog.conf man page bugfix: description of selectors
Note historic difference to BSD syslog selectors.
2022-11-18 17:33:42 +01:00
Rainer Gerhards
be8471fb3b
maintain ChangeLog 2022-11-18 10:10:47 +01:00
Rainer Gerhards
31622ed70c
Merge pull request #5022 from rgerhards/i5021
imtcp bugfix: legacy config directive did no longer work
2022-11-18 10:09:41 +01:00
Rainer Gerhards
82387d96d3
Merge pull request #5026 from alorbach/pr-issue-5025
kafka: fix building modules with static librdkafka
2022-11-17 10:52:04 +01:00
Rainer Gerhards
2623a89a0c
imtcp bugfix: legacy config directives did no longer work
Many "$InputTCPServer..." config directives did no longer work
and were completely ignored (e.g. "$InputTCPServerStreamDriverMode").

This was a regression from a08591be5d9 (May, 5th 2021).

closes https://github.com/rsyslog/rsyslog/issues/5021
2022-11-16 18:52:55 +01:00
01468e88f8 kafka: fix building modules with static librdkafka
Because of changes in commit 7305c047db,
the kafka modules were not build with static librdkafka
regarding of --enable-kafka-static.

Also added missing libraries needed for building with newer
static librdkafka.

closes: https://github.com/rsyslog/rsyslog/issues/5025
2022-11-16 16:35:39 +01:00
Rainer Gerhards
cfdca595ce
maintain ChangeLog 2022-11-16 14:56:18 +01:00
Rainer Gerhards
65bf6a0188
Merge pull request #5023 from taavi-valjaots/ksi-too-many-requests-fix
ksi bugfix: sending of too many signing requests fixed.
2022-11-16 14:54:45 +01:00
taavi.valjaots
f2395745d9 ksi bugfix: sending of too many signing requests fixed.
As there is a bug in libksi where too many signing requests may have bene sent
out the amount of signing requests will be limited by KSI module until the fix
is implemented.
2022-11-14 12:03:27 +02:00
Rainer Gerhards
d0bb52a5b2
maintain ChangeLog 2022-11-14 10:10:35 +01:00
Rainer Gerhards
bc28cab375
Merge pull request #5008 from rgerhards/i4963-emergency-mode
bugfix: prevent potential segfault when switchung to queue emergency mode
2022-11-14 10:09:29 +01:00
alakatos
2348c6424a Introduce --enable-libcap-ng configure option
The option allows to drop the capabilities to only
the necessary set, to minimize security exposure in
case there was ever a mistake in a networking
plugin or some other input resource. Moreover, it adds
ability to change uid and gid while retaining the
previously specified capabilities. Resolves #4986

Add ability to change uid and gid while retaining the capabilities previously specified
2022-11-14 09:59:50 +01:00
Rainer Gerhards
eaac48d0d2
bugfix: prevent pot. segfault when switchung to queue emergency mode
When switching to Disk queue emergency mode, we destructed the in-memory
queue object.  Practice has shown that this MAY cause races during
destruction which themselfs can lead to segfault. For that reason, we
now keep the disk queueu object. This will keep some ressources,
including disk space, allocated. But  we prefer that over a segfault.
After all, it only happens after a serious queue error when we are
already at the edge of hard problems.

see also: https://github.com/rsyslog/rsyslog/issues/4963
2022-11-10 12:59:26 +01:00
Rainer Gerhards
1a80ad6050
maintain ChangeLog 2022-11-10 12:57:16 +01:00
Rainer Gerhards
d6877018f9
Merge pull request #5009 from taavi-valjaots/ksi-root-hash-invalid-usage-fix
ksi bugfix: Segmentation fault in async mode fixed.
2022-11-07 15:02:41 +01:00
Rainer Gerhards
18dab4dea7
maintain ChangeLog 2022-11-02 12:43:59 +01:00
Rainer Gerhards
e86b1bfe50
Merge pull request #5010 from Cropi/imjournal-identifier-fallback
imjournal: add second fallback to the message identifier
2022-11-02 12:39:53 +01:00
alakatos
fb5ae30e6a imjournal: add second fallback to _COMM
If SYSLOG_IDENTIFIER is not present in the journal message,
then lookup the _COMM field, which stands for the name
of the process the journal entry originates from. This is
needed in order to be in compliance with the journalctl
output.
2022-10-31 14:40:12 +01:00
taavi.valjaots
b206bb5795 ksi bugfix: Segmentation fault in async mode fixed.
Libksi internal uses KSI_DataHash cache (in KSI_CTX) to reduce the amount of
memory allocations by recycling old objects. In async mode the root data hash is
produced in thread A by its own KSI_CTX. Async signing is run by thread B with
its own KSI_CTX. Root hash value was processed by thread B during async signing
and cache owned by thread A was affected resulting system to crash.

To fix the issue root hash value is cloned under thread B so it is not possible
to affect cache operated by another thread.
2022-10-31 10:39:55 +02:00
Rainer Gerhards
64ff7ee7f9
maintain ChangeLog 2022-10-25 12:15:10 +02:00
Rainer Gerhards
8c3b8ad88a
Merge pull request #5001 from alorbach/pr-issue-5000
testbench: Adjusted timing for test imfile-logrotate-async.sh
2022-10-25 12:12:53 +02:00
Rainer Gerhards
54ed90c7c7
maintain ChangeLog 2022-10-25 12:12:14 +02:00
Rainer Gerhards
f20a6f0c32
Merge pull request #5004 from rgerhards/i4975-regeression
core bugfix: local hostname invalid if no global() config object given
2022-10-25 12:11:10 +02:00
Rainer Gerhards
e2beca5311
core bugfix: local hostname invalid if no global() config object given
The local hostname is invalidly set to "[localhost]" on rsyslog startup
if no global() config object is present in rsyslog.conf. Sending a HUP
corrects the hostname.

This is a regression from ba00a9f25293f

closes https://github.com/rsyslog/rsyslog/issues/4975,
closes https://github.com/rsyslog/rsyslog/issues/4825
2022-10-20 18:21:00 +02:00
Rainer Gerhards
00852dbf26
prepare for next scheduled stable release cycle 2022-10-19 16:59:21 +02:00