24 Commits

Author SHA1 Message Date
PascalWithopf
19133327cc correct codestyle in rsyslog 2018-07-31 09:44:27 +02:00
Rainer Gerhards
3d7223dd25 core: add ability to limit number of error messages going to stderr
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
2017-10-12 16:14:13 +02:00
Rainer Gerhards
8d67c03d45 solaris: fix coding issues 2017-04-11 10:18:42 +02:00
Rainer Gerhards
51c03c66e0 make inline functions C99-compliant
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.
2016-09-05 16:47:14 +02:00
Rainer Gerhards
887fcfac9e fix missing prototypes in config system 2016-06-01 10:32:29 +02:00
Rainer Gerhards
32582e775b testbench: add tests for $PrivDropToGroup*
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
2016-03-24 17:55:33 +01:00
Janmejay Singh
59b46975bd dyn-stats (dynamic metric-name support) high-level impl sketch 2015-11-09 22:31:01 +05:30
Michael Biebl
6fbacdc41d typo fix: paramter → parameter
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772490
2015-06-08 20:23:01 +02:00
Rainer Gerhards
009c514395 bugfix (kind of): write pid file earlier if privileges are dropped
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
2014-12-02 10:11:51 +01:00
Rainer Gerhards
1e69188573 milestone: lookup table ready for actual load (but load not yet done) 2013-07-09 11:44:40 +02:00
Rainer Gerhards
bf85d81790 implemented freeCnf() module interface & fixed some mem leaks
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.
2012-06-25 12:35:46 +02:00
Rainer Gerhards
0f1808aad1 cleaned-up umask handling 2011-06-01 09:11:18 +02:00
Rainer Gerhards
b7315fc836 step: small improvements to input mod config plumbing 2011-05-03 18:29:09 +02:00
Rainer Gerhards
d0d9f823b7 step: put plumbing in place for new input module config system 2011-05-03 18:02:18 +02:00
Rainer Gerhards
4f8457ffe3 step: added config-specific module list 2011-04-27 15:38:06 +02:00
Rainer Gerhards
17e3f6b49c step: $ModLoad handler no longe requries conf obj
re-doing the interface, global var "loadConf" now holds that data. Makes
things simpler with legacy handler, as well as new functionality.
2011-04-27 14:02:00 +02:00
Rainer Gerhards
19c8bed08d step: outchannel list integrated into main config object 2011-04-26 17:30:59 +02:00
Rainer Gerhards
13ecf8a6ef step: config handler setting from syslogd.c moved to rsconf.c 2011-04-21 14:27:41 +02:00
Rainer Gerhards
82fa17ae56 step: begun to create a "load" interface in rsconf 2011-04-21 11:37:26 +02:00
Rainer Gerhards
28e750eebd step: slowly migrating config settings... ;) 2011-04-19 14:58:31 +02:00
Rainer Gerhards
542fd33006 some more work was required on the ruleset modification 2011-04-19 12:37:39 +02:00
Rainer Gerhards
b722cd3fe6 milestone: ruleset now supports rsconf_t 2011-04-19 12:18:26 +02:00
Rainer Gerhards
d348558a51 milestone: conf obj interface now utilzes rsconf_t 2011-04-19 11:26:37 +02:00
Rainer Gerhards
f72bde2f70 milestone: templates are now in config object 2011-04-19 09:43:36 +02:00