permit 4-digit file creation modes (actually 5 with the leading zero) so
that the setgid bit can also be set (and anything else on that position.
closes https://github.com/rsyslog/rsyslog/issues/1092
The --enable-libcurl switch was added to be able to disable libcurl
functionality inside the rsyslog core, see 46f4f43. As libcurl is no
longer used inside the core (due to introducing function modules),
--enable-libcurl needs to be removed.
closes https://github.com/rsyslog/rsyslog/issues/2628
When a "call" script statement was used with a non-existing ruleset AND
debug logginf was active for rainerscript.c, valgrind complained and
one debug message could potentially be incorrect (stating a queue
where non was).
This was caused by not initializing a variable which was probed in
debug mode before it was set. Non-debug mode was not affected.
see also https://github.com/rsyslog/rsyslog/issues/2399#issuecomment-384890873
as it looks, some compiler versions (e.g. gcc 7) seem to be rather
picky on the position where this attribute is applied. So this
commit moves them to the position where they are properly detected.
We also add missing attributes. Some are missing due to conditional
compilation what we did not detect in our regular development
environments. This now comes up as we have enabled the corresponding
warning globally, and so they now also show up on those platforms.
function modules add functions to rainerscript dynamically,
change http_request into such a module (enabled by default).
This module can be used as a sample for future function modules.
calling and identifying a script function now works via
a function pointer. Going forward, this will be used when
making loadable functions in rainerscript.
This rule was never applied, actually flex even complained about it.
It should not have been there in the first place. The match is actually
done right at the top of the <EXPR> block.
For auto-generated configs, it is useful to have the ability to disable some
config constructs even though they may be specified inside the config. This
can now be done via the ```config.disable``` parameter, applicable to all
script objects. If set to ```on``` or not specified, the construct will be
used, if set to any other value, it will be ignored. This can be used
together with the backtick functionality to configure enable and disable
from either a file or environment variable.
Example:
Let's say we want to conditionally load a module. Environment variable ```LOAD_IMPTCP```will be either unset or ```off``` . Then we can use this config construct:
```
module(load="imptcp" config.enabled=`echo $LOAD_IMPTCP`)
```
It the variable is set to ```off```, the module will **not** be loaded.
closes https://github.com/rsyslog/rsyslog/issues/2431
This permits to include files (like legacy $IncludeConfig) via a
script object. Needless to say, the script object offers more
features:
- include files can now be
- required, with rsyslog aborting when not present
- required, with rsyslog emitting an error message but otherwise
continuing when not present
- optional, which means non-present include files will be
skipped without notice
This is controlled by the "mode" parameter.
- text can be included form e.g. an environment variable
--> ex: include(text=`echo $ENVVAR`)
This finally really obsoletes $IncludeConfig.
closes https://github.com/rsyslog/rsyslog/issues/2151
We introduce strings enclosed in backticks, which is along the lines
of what the shell does. However, we currently only support
"echo $VARNAME" -- but this may be extended later on.
closes https://github.com/rsyslog/rsyslog/issues/2416
When using --disable-libcurl, libgrammar should not be linked against
libcurl unconditionally as CURL_LIBS might be set if one of the modules
using libcurl, like elasticsearch, is enabled.
if the tail of message similar to replacement string. Example:
msg: 1234567890
replacement: 8906
the last N (amount of similar symbols in tail of message and the begin of replacement,
in current example = 3) will never be assigned in dst message. And will contain a garbage.
As longer replacement string as more garbage will be in dst message instead of a required
src tail.
The length of dst message is right. The tail of dst message filled with garbage.
Because of memory for dst message is allocated with right size, but didn't filled if
the tail of message partially equals to a beginning of a replacement string.
This most probably could not happen in the past as bare variable root
references were not permitted by grammar. However, we haven't done a
thougrough check if there still was a possibility to trigger this bug
somehow, so we do this in our own commit.