81 Commits

Author SHA1 Message Date
mrworkman
bb60c206f0 Fix broken 'debugless' build. 2017-09-12 08:01:39 -04:00
Jan Gerhards
edfc4396a3 core: add parameters debug.file and debug.whitelist
allows to generate debug log output only of specific files
2017-08-08 12:12:39 +02:00
Pascal Withopf
b63a6b9010 codestyle: line length adjusted 2017-01-17 08:54:37 +01:00
purnima
653434a4a5 Fix unintended changes in AIX Port 2016-11-22 16:51:07 +05:30
purnima
d45daa2af0 Rebase,redefine msgDestruct() as smsg_t is used 2016-11-22 14:24:25 +05:30
Rainer Gerhards
c403a56f09 remove inline from excessively long functions 2016-10-08 16:50:12 +02:00
Rainer Gerhards
bbcbb03c64 fix compiler warnings 2016-07-22 15:00:28 +02:00
Rainer Gerhards
b3940cb966 remove excessive "inline" attributes 2016-06-03 12:24:27 +02:00
Rainer Gerhards
8a8675b223 fix compiler warnings 2016-06-02 10:18:05 +02:00
Rainer Gerhards
887fcfac9e fix missing prototypes in config system 2016-06-01 10:32:29 +02:00
Rainer Gerhards
ee6b11f9ad cleanup: remove unused code 2016-04-25 08:09:18 +02:00
Peter Portante
2470f0f72b Remove use of sizeof(char) and sizeof(uchar)
Remove the use sizeof(char) or sizeof(uchar) in calculations for memory
allocation or string length.  There are no known platforms for which
sizeof(char) or sizeof(uchar) is not 1, and c99 has defined sizeof(char)
to be 1 (section 6.5.3.4 of c99).
2015-12-16 02:18:45 +00:00
Rainer Gerhards
5158095113 Merge branch 'v8-stable' 2014-07-22 16:21:49 +02:00
Tomas Heinrich
85ba90da09 Prevent dereferencing a NULL pointer
Error: NULL_RETURNS (CWE-476):
rsyslog-7.4.10/runtime/debug.c:698: returned_null: Function "calloc(size_t, size_t)" returns null (checked 107 out of 123 times).
rsyslog-7.4.10/action.c:333: example_checked: Example 1: "calloc(1UL, 264UL)" has its value checked in "(pThis = (action_t *)calloc(1UL, 264UL)) == NULL".
rsyslog-7.4.10/grammar/rainerscript.c:932: example_checked: Example 2: "calloc(params->nParams, 24UL)" has its value checked in "(vals = calloc(params->nParams, 24UL)) == NULL".
rsyslog-7.4.10/outchannel.c:47: example_checked: Example 3: "calloc(1UL, 48UL)" has its value checked in "(pOch = calloc(1UL, 48UL)) == NULL".
rsyslog-7.4.10/parse.c:75: example_checked: Example 4: "calloc(1UL, 16UL)" has its value checked in "(pThis = (rsParsObj *)calloc(1UL, 16UL)) == NULL".
rsyslog-7.4.10/plugins/imfile/imfile.c:496: example_checked: Example 5: "calloc(1UL, 40UL)" has its value checked in "(pModConf = calloc(1UL, 40UL)) == NULL".
rsyslog-7.4.10/runtime/debug.c:698: var_assigned: Assigning: "pThrd" = null return value from "calloc(size_t, size_t)".
rsyslog-7.4.10/runtime/debug.c:699: dereference: Dereferencing a null pointer "pThrd".
2014-07-22 16:13:42 +02:00
Rainer Gerhards
0072f3c50c comment correction 2014-07-16 09:13:30 +02:00
Rainer Gerhards
36ef9e7e11 re-enable thread naming in debug logs 2014-07-16 08:04:16 +02:00
Rainer Gerhards
12ee4a7610 add messages when using new debug system
Conflicts:

	configure.ac
2013-12-12 14:38:28 +01:00
Rainer Gerhards
80be25a5e0 add debug.OnShutdown global parameter 2013-12-11 14:51:53 +01:00
Rainer Gerhards
1f2b6f1a9b bugfix: potential hang *in debug mode* on rsyslogd termination 2013-05-15 07:45:33 +02:00
Rainer Gerhards
aef0be0c17 bugfix: solve compile problems on non-Linux platforms
Thanks to Michael Biebl for alerting us on this issue.
2013-03-19 16:20:25 +01:00
Rainer Gerhards
dac7e3d39b Merge branch 'v7-stable'
Conflicts:
	runtime/debug.h
	tools/syslogd.c
2013-03-18 12:31:20 +01:00
Rainer Gerhards
0114b531b3 debug system improvement & bug fix for init system status (see below)
- rsyslogd startup information is now properly conveyed back to init
  when privileges are beging dropped
  Actually, we have moved termination of the parent in front of the
  priv drop. So it shall work now in all cases. See code comments in
  commit for more details.
- If forking, the parent now waits for a maximum of 60 seconds for
  termination by the child
- improved debugging support in forked (auto-backgrounding) mode
  The rsyslog debug log file is now continued to be written across the
  fork.
2013-03-15 14:33:23 +01:00
Rainer Gerhards
8700672c76 added ability to configure debug system via rsyslog.conf 2013-02-27 17:37:56 +01:00
Rainer Gerhards
17d48fc499 added capability to output thread-id-to-function debug info
This is a useful debug aid, but nothing of concern for regular users.
2013-01-13 12:14:58 +01:00
Rainer Gerhards
f161dfefd2 silence some primarily cosmetic compiler warning messages 2012-11-28 10:11:14 +01:00
Rainer Gerhards
d752786d4f re-enabled commented-out serialization support in debug handler 2012-10-11 09:27:30 +02:00
Rainer Gerhards
6bc629021e Merge branch 'v5-beta' into beta
Conflicts:
	ChangeLog
2012-05-29 11:36:13 +02:00
Tomas Heinrich
a4980cbde2 bugfix: if debug message could end up in log file when forking
if rsyslog was set to auto-background (thus fork, the default) and debug
mode to stdout was enabled, debug messages ended up in the first log file
opened. Currently, stdout logging is completely disabled in forking mode
(but writing to the debug log file is still possible). This is a change
in behaviour, which is under review. If it causes problems to you,
please let us know.

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2012-05-29 11:21:50 +02:00
Rainer Gerhards
ac9afc4149 Merge branch 'v5-stable' into master
Conflicts:
	ChangeLog
	action.h
	configure.ac
	doc/manual.html
	plugins/immark/immark.c
	plugins/impstats/impstats.c
	plugins/imptcp/imptcp.c
	plugins/imtcp/imtcp.c
	runtime/cfsysline.c
	runtime/cfsysline.h
	runtime/conf.c
	runtime/ctok.c
	runtime/ctok.h
	runtime/ctok_token.c
	runtime/ctok_token.h
	runtime/dnscache.h
	runtime/expr.c
	runtime/expr.h
	runtime/rule.c
	runtime/rule.h
	runtime/ruleset.h
	runtime/sysvar.c
	runtime/vm.h
	runtime/vmop.c
	runtime/vmop.h
	runtime/vmprg.c
	runtime/vmprg.h
	runtime/vmstk.c
	runtime/vmstk.h
	tools/omusrmsg.c
2012-01-18 14:08:24 +01:00
Rainer Gerhards
18e60f46a1 Merge branch 'v4-stable' into v5-stable
Conflicts:
	runtime/debug.h
	runtime/obj.c
	runtime/parser.h
	runtime/wti.h
2012-01-16 16:14:30 +01:00
Rainer Gerhards
f6dea36394 runtime license change 2012-01-16 12:39:01 +01:00
Rainer Gerhards
fd256a09ff tcpsrv select-handler experimentally moved to multi-threading as well
first tests done with plain tcp, TLS subsystems tests need to be
carried out. No serious lab testing done so far.
2011-01-31 15:59:43 +01:00
Rainer Gerhards
a4a94ddfc0 interim commit: current debug state of new imptcp
I need to verify the concept used in a simpler environment, and this
means I probably need to freeze the (non-working) state here for
a couple of days.
2011-01-28 11:00:21 +01:00
Rainer Gerhards
d3da845a61 Merge branch 'v5-stable' into v5-devel
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
2010-12-17 11:46:06 +01:00
Rainer Gerhards
b9ba5013ad bugfix: batch processing flagged invalid message as "bad" under some circumstances
also fixed some cosmetic nits
2010-12-16 14:23:38 +01:00
Rainer Gerhards
189a26c044 Merge branch 'v4-stable' into v5-stable
Conflicts:
	ChangeLog
	runtime/parser.c
	runtime/queue.c
	runtime/wtp.c
	template.c
	threads.c
	tools/syslogd.c
2010-12-16 13:59:16 +01:00
Rainer Gerhards
4da2cbcae7 Merge branch 'v4-stable' into v4-devel
Conflicts:
	runtime/parser.c
2010-12-16 13:00:27 +01:00
Rainer Gerhards
371a8eec29 some cleanup based on clang static analyzer results 2010-12-16 12:57:55 +01:00
Rainer Gerhards
2a2cc3d26d minor: added version number to some error messages 2010-09-17 12:20:59 +02:00
Rainer Gerhards
4a5a3196fb Merge branch 'v4-devel' into master
Conflicts:
	runtime/Makefile.am
	runtime/atomic.h
	runtime/queue.c
	runtime/queue.h
	runtime/wti.c
	runtime/wti.h
	runtime/wtp.c
	runtime/wtp.h
2010-04-27 17:49:06 +02:00
Rainer Gerhards
cbe2e3d444 bugfix: problems with atomic operations emulation
replaced atomic operation emulation with new code. The previous code
seemed to have some issue and also limited concurrency severely. The
whole atomic operation emulation has been rewritten.
2010-04-27 17:31:28 +02:00
Rainer Gerhards
ada87cbaef Merge branch 'v4-devel' into master
Conflicts:
	ChangeLog
	Makefile.am
	configure.ac
	doc/manual.html
	runtime/debug.c
	runtime/rsyslog.h
	tests/Makefile.am
	tests/diag.sh
	tests/nettester.c
	tools/syslogd.c
2010-04-19 15:13:33 +02:00
Rainer Gerhards
54ae07e33c slightly improved/cleaned up debugging system 2010-04-14 08:30:15 +02:00
Rainer Gerhards
25bc3b2e30 Merge branch 'v4-stable-solaris' into v4-devel
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	tools/omfile.c
	tools/syslogd.c
2010-04-12 09:10:19 +02:00
Rainer Gerhards
8f0a8076cc Merge branch 'beta' into master
Conflicts:
	ChangeLog
	configure.ac
	plugins/imudp/imudp.c
	runtime/stream.h
	tests/Makefile.am
	tests/diag.sh
	tools/omfile.c
2010-04-09 13:00:56 +02:00
Rainer Gerhards
8b9cef552d Merge branch 'v4-stable' into v5-stable
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	runtime/debug.c
	runtime/stream.c
	tests/Makefile.am
	tests/diskqueue.sh
	tests/nettester.c
	tools/omfile.c
2010-03-29 11:07:15 +02:00
Rainer Gerhards
16cb5ae53c enhanced dbgoprint() buffer size 2010-03-16 17:06:21 +01:00
Rainer Gerhards
a1127abbae bugfix(minor): handling of extremely large strings in dbgprintf() fixed
Previously, it could lead to garbagge output and, in extreme cases, also
to segfaults. Note: this was a problem only when debug output was
actually enabled, so it caused no problem in production use.
2010-03-15 09:29:54 +01:00
Rainer Gerhards
83c15bb0a0 added more tests to testbench and improved testing tools 2010-03-11 12:36:21 +01:00
Rainer Gerhards
c802afb7e0 Merge branch 'v5-stable'
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	doc/property_replacer.html
	runtime/datetime.h
2010-03-09 14:28:30 +01:00