Rainer Gerhards
6efae3c2fd
fix compile warnings under AIX
...
see also https://github.com/rsyslog/rsyslog/issues/2971
2018-08-31 05:14:01 -05:00
PascalWithopf
19133327cc
correct codestyle in rsyslog
2018-07-31 09:44:27 +02:00
Rainer Gerhards
fff09ac94d
core: replace errmsg object calling conventions
...
old interface still needs to be removed to fully finish
refactoring of this component.
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-07-21 17:47:29 +02:00
Rainer Gerhards
d7aea382fa
fix build warning on Alpine Linux
...
due to old-style header names -- now using the new ones, which are also
supported on the other platforms.
2018-01-12 13:15:55 +01:00
Rainer Gerhards
147584c19b
mmexternal: refactor stdin/out/err assignment
...
use more reliable and portable way
closes https://github.com/rsyslog/rsyslog/issues/2275
2017-12-20 15:58:26 +01:00
Rainer Gerhards
8d807e35f0
mmexternal bugfix: potentially missing argv[0]
...
This is incorrect and can cause problems with some language, namely go.
see also https://github.com/rsyslog/rsyslog/issues/1858
closes https://github.com/rsyslog/rsyslog/issues/2278
2017-12-20 15:58:26 +01:00
Rainer Gerhards
9f3a25cf6e
mmexternal: some cleanup
2017-12-20 15:58:20 +01:00
Rainer Gerhards
9d44c9556e
mmexternal: better error reporting when ext prog cannot be exec'ed
2017-12-20 10:18:34 +01:00
BSD Patch
52eae57751
mmexternal: import BSD project patch
2017-12-18 13:21:29 +01:00
Rainer Gerhards
dce50efcb4
mmextrenal: fix double-free
...
regression from 8.31.0
fixes https://github.com/rsyslog/rsyslog/issues/2164
2017-12-07 09:35:20 +01:00
Rainer Gerhards
6bfc00bdef
refactor modules that do not expose legacy action interface
...
simplify code, also gets us rid of Coverity cosmetic CIDs
2017-12-04 19:06:59 +01:00
Rainer Gerhards
e77ecdc3d0
mmexternal: "fix" Coverity scan complaint
2017-11-21 08:58:23 +01:00
Rainer Gerhards
cea40b005e
"fix" Coverity false positive CID 185363
...
We hope to get past the false positive by pretending we store the
values for reuse (what never can happen, but that's the sole point
of this function...).
2017-11-20 09:14:48 +01:00
PascalWithopf
e485c5c5bc
codestyle: shorten lines to max 130 chars
2017-11-15 09:04:42 +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
Rupert
a6a24abf13
portability: fixes needed to build on osx
...
Thanks to github user hdatma
2017-05-15 09:05:05 +02:00
purnima
d45daa2af0
Rebase,redefine msgDestruct() as smsg_t is used
2016-11-22 14:24:25 +05:30
Rainer Gerhards
448f16495c
remove "inline" attribute from excessivly long functions
2016-10-26 11:50:15 +02:00
Rainer Gerhards
5e3b075d53
fix compiler warnings
2016-06-02 12:08:55 +02:00
Rainer Gerhards
f9ada8897f
mmexternal: fix extra printf parameter
2016-01-13 05:09:10 -05:30
Rainer Gerhards
2e55c77d70
clean up doAction output module interface
...
We started with char * pointers, but used different types of pointers
over time. This lead to alignment warnings. In practice, I think this
should never cause any problems (at least there have been no reports
in the 7 or so years we do this), but it is not clean. The interface is
now cleaned up. We do this in a way that does not require modifications
to modules that just use string parameters. For those with message
parameters, have a look at e.g. mmutf8fix to see how easy the
required change is.
2016-01-13 04:04:26 -05:30
Rainer Gerhards
836a7c8b3f
Merge branch 'fix-dbg-stmts' of https://github.com/portante/rsyslog into master-candidate
...
Conflicts:
grammar/rainerscript.c
plugins/mmexternal/mmexternal.c
plugins/omprog/omprog.c
2015-12-06 15:21:22 +01:00
Rainer Gerhards
8bf5284167
cleanup: debug messages that weren't meant to stay
...
removed debug messages that were orignally added just for testing
during feature development
see also https://github.com/rsyslog/rsyslog/pull/652
Thanks to Peter Portante for alerting me on them.
2015-12-06 13:47:36 +01:00
Peter Portante
752d32f600
Bury es_str2cstr() calls under explicit Debug test
...
In rainerscript.c there was a wayward debug statement emitting a es str,
where the es string was converted to a c-string before printing, and
then freeing the memory. It would seem doing that on the fast path is
unnecessary, so we moved it under an explicit Debug test.
Searching for other uses of es_str2cstr() calls in dbgprintf() calls
(lowercase), which would mean that the memory allocation always occurs
even if the debugging is not enabled, we found two in omprog and
mmexternal.
In the modules that we touched, we switched to use DBGPRINTF() were
possible and logical, to avoid processing any parameters on the fast
path.
2015-12-05 01:43:44 +00:00
2edfb087b8
FreeBSD: Fixed mulitple compile issues in plugins.
...
Also fixed headers for Freebsd in test tools.
2015-07-14 14:28:29 +00:00
Chris Hiszpanski
20d869968b
Added LIBLOGGING_STDLOG_CFLAGS and LIBLOGGING_STDLOG_LIBS to automake sources
...
Build was failing when using these variables
2014-09-25 05:06:57 -07:00
Rainer Gerhards
fc3c2bdcfb
bugfix: mmexternal remove framing char before processing JSON reply
...
This did not have any real bad effects, but caused unnecessary
processing, as empty replies were not properly detected. Otherwise,
the bug was not noticible from the user's PoV.
2014-05-01 11:39:22 +02:00
Rainer Gerhards
e7bfdbea5c
bugfix: mmexternal segfault due to invalid free in non-json input mode
...
closes: https://github.com/rsyslog/rsyslog/issues/70
2014-05-01 11:33:28 +02:00
Rainer Gerhards
5ff5a16718
bugfix: mmexternal segfault when external plugin sent invalid reply
...
... or no reply at all. This happened if the reply was imporper JSON.
Now, we emit an error message in those cases.
see also: https://github.com/rsyslog/rsyslog/issues/69
2014-04-30 13:01:31 +02:00
Rainer Gerhards
b43ce5db61
bugfix: mmexternal did potentially pass incomplete data to restarted external plugin
...
This could happen if EPIPE was returned "too late", in which case the
beginning of the data could be lost.
2014-04-28 17:24:44 +02:00
Rainer Gerhards
d385aa6dc0
bugfix: mmexternal did not properly process messages over 4KiB
...
The data to be passed to the external plugin was truncated after 4KiB.
see: https://github.com/rsyslog/rsyslog/issues/64
2014-04-28 17:21:40 +02:00
Rainer Gerhards
461310c89f
bugfix/mmexternal: memory leak
2014-04-15 13:48:34 +02:00
Rainer Gerhards
3fcccc4098
typo fix
2014-04-13 18:46:00 +02:00
Rainer Gerhards
f860025bd4
mmexternal: support "json" inbound message passing
2014-04-08 12:24:28 +02:00
Rainer Gerhards
90e2a1a8df
add modifiable properties to external message modification module interface
...
The set is still incomplete, but I noticed that it is better to add some
"const" definitions to older versions (probably v7-stable) before
continuing.
2014-04-04 08:19:14 +02:00
Rainer Gerhards
2996241346
mmexternal: new solid external plugin response reader
...
we can now read arbitrary long responses; PoC code replaced.
2014-04-02 13:09:37 +02:00
Rainer Gerhards
ec1007f154
mmexternal: remove remains of template use
...
No longer needed/possible due to message passing mode (leftover)
2014-03-17 18:55:43 +01:00
Rainer Gerhards
90773b0ac6
mmexternal: add "interface.input" config parameter
...
permits to specify what should be passed to external program
2014-03-17 18:54:03 +01:00
Rainer Gerhards
a7c6b9cde5
milestone/mmexternal: support replacing msg property, fix stall in mmexternal
2014-03-17 08:00:21 +01:00
Rainer Gerhards
969ae613b9
milestone/mmexternal: change to use message passing interface
...
this is required as we need to modify the messages; this also means
tempates can not be used when sending data to it.
2014-03-16 15:54:52 +01:00
Rainer Gerhards
2fd9f783c8
mmexternal: funnel program reply through to msg object
2014-03-09 18:53:34 +01:00
Rainer Gerhards
c2a6f8d3cb
make mmexternal read synchronously from external program
2014-03-08 17:03:21 +01:00
Rainer Gerhards
508bd638e4
add mmexternal skeleton (support external message mod plugins)
2014-03-06 17:40:57 +01:00