2811 Commits

Author SHA1 Message Date
Rainer Gerhards
cdd9887e82
Merge pull request #1940 from jgerhards/cov185418
mmanon: fix potential NULL-pointer exception
2017-10-30 17:25:41 +01:00
Jan Gerhards
4e66260dcf mmanon: fix potential NULL-pointer exception
detected by coverity scan, CID 185333
2017-10-30 17:02:28 +01:00
Rainer Gerhards
77e1e6b09c
Merge pull request #1936 from rgerhards/cid-185374
omtesting: flag use of rand() function as intentional (for Coverity)
2017-10-30 14:24:49 +01:00
Jan Gerhards
7ca58e16ae mmanon: fix potential NULL-pointer exception
detected by coverity scan, CID 185418
2017-10-30 14:22:26 +01:00
Rainer Gerhards
a3326ed49d omstdout: fix theoretical buffer overrun
The overrung occurs in code for testing an interface that currently
does not exists, so the overrun can actually never happen. We fixed
it anyhow to keep Coverity scan clean of defects.

Note also that omstdout is a testbench tool not intended for
production.

Detected by Coverity scan, CID 185325
2017-10-30 12:26:38 +01:00
Rainer Gerhards
5204a7faf9 omtesting: flag use of rand() function as intentional (for Coverity)
CID 185374
2017-10-30 11:36:33 +01:00
Rainer Gerhards
97bbca13fe omjournal bugfix: NULL pointer access on invalid parameters
could happen only during startup
2017-10-29 19:13:04 +01:00
Rainer Gerhards
0d6445c1fc mmexternal: fix memory leak
This was induced by a change to the lower-level message object quite
a while ago.

Detected by Coverity scan, CID 185332
2017-10-29 19:13:04 +01:00
Niels Becker
d2df0d0105 Merge branch 'master' of https://github.com/rsyslog/rsyslog into v8-stable 2017-10-29 11:54:48 +01:00
Rainer Gerhards
79c0a961fd omprog: change init sequence to work around analyzer false positive
Coverty scan detected an error where none is, trying to work around
that issue. CID 185425
2017-10-29 10:23:12 +01:00
Rainer Gerhards
573af0da93
Merge pull request #1924 from rgerhards/coverty-6
fixes based on Coverity scan
2017-10-28 18:12:33 +02:00
Rainer Gerhards
929bf07922
Merge pull request #1753 from jsiwrk/feature/omprog_with_feedback
omprog: added error handling and transaction support for external plugins
2017-10-28 18:06:56 +02:00
Rainer Gerhards
886e481465 omuxsock: fix potential buffer overflow
if configured socket name is overly long

Detected by Coverity scan, CID 185405
2017-10-28 14:33:22 +02:00
Rainer Gerhards
0204db6cce imptcp: potential buffer overflow
if the local hostname or IP is larger than NI_MAXHOST-1, an internal
buffer is overflowed. This is irrespective of any input data.

Detected by Coverity scan, CID 185390
2017-10-28 14:23:53 +02:00
Rainer Gerhards
3d1be1fd32
Merge pull request #1918 from rgerhards/coverty-5
fix coverty scan issues
2017-10-28 12:20:06 +02:00
Hugo SOSZYNSKI
4b1a53b10f Updated the ommongodb README with a more complex example and the FreeBSD 11.1 test environment. 2017-10-27 17:02:37 +02:00
Rainer Gerhards
aa39bf21b7 imuxsock: fix string being potentially not terminated by '\0'
Detected by Coverty scan, CID 185355
2017-10-27 16:18:10 +02:00
Hugo SOSZYNSKI
f8b281dab3 Updated ommongodb to use mongo-c-driver which offers a lot more functions such as ssl connexions and MongoDB Replicasets compatibility.
- Added the 'ssl_ca' and 'ssl_cert' directives to configure ssl connexion.
 - Added 'uristr' directive to configure the connexion uri directly. This directive overrides the 'uid', 'pwd', 'server' and 'serverport' directives. To create the uri, please refer to the official MongoDB Connection String documentation.
2017-10-27 15:43:31 +02:00
Rainer Gerhards
9c45ce6ce7 omelasticsearch bugfix: output from libcurl to stdout
omelasticsearch made libcurl output messages to stdout. This
commit fixes that. It also automatically enables libcurl verbose
mode during debug runs - it needs to be seen if this is smart or
not (previously, code needed to be commented in).

closes https://github.com/rsyslog/rsyslog/issues/1909
2017-10-27 13:31:11 +02:00
Niels Becker
7931581d49 omelasticsearch: add dynamic pipline support 2017-10-27 12:50:40 +02:00
Hugo SOSZYNSKI
1475c27abf New ommongodb compile without warning 2017-10-26 17:38:26 +02:00
Patryk Ściborek
0f5b086c71 omelasticsearch: add pipeline support 2017-10-26 14:30:55 +02:00
Rainer Gerhards
87a831d6e1 Merge pull request #1901 from PascalWithopf/imudp_address_error
imudp: add error msg when listener wasn't created
2017-10-26 09:40:37 +02:00
Joan Sala
52000005c5 omprog: added error handling and transaction support for external plugins 2017-10-25 22:42:39 +02:00
Rainer Gerhards
09cff653f7 Merge pull request #1871 from PascalWithopf/relp_certificate
omrelp/imrelp: fix certificate check
2017-10-25 17:13:48 +02:00
PascalWithopf
145e6b4d0c imudp: add error msg when listener wasn't created
When udp listener could not be created, an error message containing the ip-address and port is put out.
closes https://github.com/rsyslog/rsyslog/issues/1899
2017-10-25 15:19:05 +02:00
Rainer Gerhards
4736e53d47 imjournal bugfix: module did not work at all
The open function was broken by commit 92ac801 (v8.30.0),
resulting in no data being ever read from the journal.

patch bases on the idea of Radovan Sroka given here:
https://github.com/rsyslog/rsyslog/issues/1895#issuecomment-339017357
but follows the current imjournal-paradigm of having the journal
handle inside a global variable.

see also https://github.com/rsyslog/rsyslog/issues/1895
closes https://github.com/rsyslog/rsyslog/issues/1897
2017-10-25 11:15:01 +02:00
PascalWithopf
72817a578c omrelp/imrelp: fix certificate check
When the certificate file specified in the omrelp/imrelp configuration
can't be accessed, e.g. because it doesn't exist or you don't have permission
to do so, a Segmentation Fault will appear when you start Rsyslog. This commit
fixes that problem.
closes https://github.com/rsyslog/rsyslog/issues/1869
2017-10-25 09:14:32 +02:00
Rainer Gerhards
eac80dec35 imptcp: fix potential misadressing
When during a connection request the remote peer could not be
identified, imptcp could misadress memory if it is configured
to emit messages on connection open.

Detected by clang 5.0 static analyzer.
2017-10-24 11:23:33 +02:00
Rainer Gerhards
a35def0497 Merge pull request #1884 from rgerhards/merge-961
imfile improvements
2017-10-23 11:37:45 +02:00
Rainer Gerhards
87b6f071fa Merge commit '8c6d4fd' into merge-961 2017-10-22 15:33:12 +02:00
Rainer Gerhards
4cbebce23d Merge commit 'b8863c2a6a879e54fccae50209ec285ccbe712dd' into merge-961 2017-10-22 15:29:23 +02:00
Rainer Gerhards
43b621b491 mmpstrucdata bugfix: formatting error of ']' char
This was invalidly formatted as '"'. Thanks to github user
wu3396 for the error report including the patch idea.

closes https://github.com/rsyslog/rsyslog/issues/1826
2017-10-20 18:37:09 +02:00
Rainer Gerhards
9752fb0502 mmanon: re-enable a fallthrough
after spoken with original author (jgerhards), fallthrough is
better, so changing this to gcc7 attribute

see also https://github.com/rsyslog/rsyslog/pull/1798
2017-10-19 19:37:50 +02:00
Rainer Gerhards
bfc4953f32 imfile: "fix" gcc7 warning 2017-10-19 19:37:40 +02:00
Rainer Gerhards
8fa9a10a7e imrelp: fix potential misadressing during config read phase
this affects rsyslog startup only
2017-10-19 13:30:39 +02:00
Rainer Gerhards
1440aa8831 Merge pull request #1798 from wdauchy/fall_through
mmanon: fix fall through warning
2017-10-19 13:03:10 +02:00
Rainer Gerhards
c503c70913 Merge pull request #1855 from rgerhards/i-1838
fix imgssapi
2017-10-19 11:14:09 +02:00
Rainer Gerhards
7555d1249c Merge pull request #1851 from Whissi/issue_1838
imgssapi: Incooperate changes from tcpsrv subsystem
2017-10-18 19:28:15 +02:00
Rainer Gerhards
9dc9a90e3d imgssapi: fix potential memory leak detected by clang static analyzer
... and some cosmetic fixes to remove static analyzer false positives
2017-10-18 19:25:28 +02:00
Thomas Deutschmann
4affba6acd
imgssapi: Remove outdated iRet value check 2017-10-18 12:34:31 +02:00
Rainer Gerhards
69b95178aa omgssapi: fix build issues 2017-10-18 09:26:23 +02:00
Rainer Gerhards
38538b6ac6 imtcp: fix "streamdriver.mode" parameter
Valid value 0 was not permitted as config value.

closes https://github.com/rsyslog/rsyslog/issues/1850
2017-10-17 17:40:53 +02:00
Rainer Gerhards
8d793eafdd imgssapi: fix compiler warnings 2017-10-17 17:34:49 +02:00
Thomas Deutschmann
0bb3fced61
imgssapi: Incooperate changes from tcpsrv subsystem
Commit 5c5a7a3ed509dfb39b451c806646ab67782f6eda introduced an additional parameter
"oserr".

Fixes: https://github.com/rsyslog/rsyslog/issues/1838
2017-10-17 17:02:13 +02:00
Rainer Gerhards
cdd7b62c60 ommysql: do not duplicate entries on failed transaction
If a multi-message batch contains data errors, messages may be
duplicated as connection close is implicit commit (not rollback).
This patch introduces a specific rollback request in those cases.

closes https://github.com/rsyslog/rsyslog/issues/1829
2017-10-10 14:28:44 +02:00
Rainer Gerhards
e9a27a0c53 ommysql: treat server and client-generated messages differently
Server-generated error messages are considered non-recoverable, while
client generated once point into connection problems (which simply can
be retried). This is part of the improvements towards better
message-induced errors. Previous commits did only handle SQL parsing
errors, now we aim to address all of the message-induced error. We assume
that all server-generated errors are such - mysql API unfortunately does
not provide a clear indication of what type if error this is and it is
out of question to check for hundereds of error codes.

closes https://github.com/rsyslog/rsyslog/issues/1830
2017-10-10 14:19:21 +02:00
Rainer Gerhards
50c4d27fff ommysql: improve error messages 2017-10-07 12:14:23 +02:00
Rainer Gerhards
11ce77c19e ommysql: return error code on data failure
ommysql should return RS_RET_DATAFAIL if it knows that
a message can definitely never by processed, e.g. because
of a syntax error inside the message. This helps improve
retry and suspension processing.

closes https://github.com/rsyslog/rsyslog/issues/1819
2017-10-06 12:57:45 +02:00
Rainer Gerhards
ea1860deb0 ommysql: update to v8 transactional interface
provides higher performance and better reliability;
module currently uses old-style interface with new-style emulation.

closes https://github.com/rsyslog/rsyslog/issues/1817
2017-10-06 12:39:09 +02:00