This permits to put a hard limit on the number of messages that can
go to stderr. If for nothing else, this capability is helpful for the
testbench. It permits to reduce spamming the test log while still
providing the ability to see initial error messages. Might also be
useful for some practical deployments.
closes https://github.com/rsyslog/rsyslog/issues/1841
As it seems, different C compilers have different rules/interpretations
on inline functions. The current code base did not properly obey all C99
rules. We fix this by converting some functions to macros and others to
include the necessary C99 plumbing. We also remove some inline attributes
for functions where this seems to be to agressive (aka "function to big").
This fixes build problems in some environments and is a general code
cleanup measure.
This also introduces a new global setting to permit keep
supplemental groups during privilege drop. This is needed
when we want to run the tests as non-root (what we want).
Sample:
global(privdrop.group.keepsupplemental="on")
The new tests ensure that we catch regressions in the privilege
drop code.
see also https://github.com/rsyslog/rsyslog/issues/889
We moved writing the pid file to after the initialization, so that
it is written only if the rsyslog process actually runs. However,
when dropping privileges, this can cause problems when rsyslog then
no longer has sufficient permission to write the pid file. This
happens frequently, as the pid file is usually stored directly under
/var/run.
A proper solution would be to create a rsyslog-user-writable directory
under /var/run, and make other scripts use that. However, this causes
grief for a lot of distros, and so we create a work-around: when
privileges are dropped, the pid file is again written a bit too early,
before privileges are dropped. This can lead to a false sense of
startup, but given the fact that this was no big problem the past
10+ years, it isn't supposed to be a big one for the coming years.
If no privileges are dropped, the pid file is still written at the
"correct" place, when rsyslog has completely been started up.
closes https://github.com/rsyslog/rsyslog/issues/169
The interface was actually not present in older versions, even though some modules
already used it. The implementation was now done, and not in 6.3/6.4
because the resulting memory leak was ultra-slim and the new interface
handling has some potential to seriously break things. Not the kind of
thing you want to add in late beta state, if avoidable.