289 Commits

Author SHA1 Message Date
Yann Droneaud
cd8c6abcc8 Includes "config.h" before any other header.
For consistency, ./configure generated "config.h" must be the first
header include through out the project.

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2010-03-04 08:00:39 +01:00
Rainer Gerhards
6cf9bf703d bugfix: potential (but very impropable) segfaults in omfile
- bugfix: potential segfault in omfile when a dynafile open failed
  In that case, a partial cache entry was written, and some internal
  pointers (iCurrElt) not correctly updated. In the next iteration, that
  could lead to a segfault, especially if iCurrElt then points to the
  then-partial record. Not very likely, but could happen in practice.
- bugfix (theoretical): potential segfault in omfile under low memory
  condition. This is only a theoretical bug, because it would only
  happen when strdup() fails to allocate memory - which is highly
  unlikely and will probably lead to all other sorts of errors.
2010-03-02 11:32:43 +01:00
Cristiano
d7755dd3dc solved compile problems on FreeBSD 9.0 (those caused by utmpx.h)
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2010-03-02 07:37:48 +01:00
Rainer Gerhards
7b654060b6 fixed typo that (could have) caused compilation fail under FreeBSD
Note that I now also prefer to use utmp.h if it is present - this seems
to be much better under Linux.
2010-03-01 07:57:24 +01:00
Rainer Gerhards
2c39f76037 make $ActonFileDefaultTemplate available to ompipe
This was not honored by the new ompipe module, because it is a local
file directive (it was applied to pipes as a side-effect of using the
same module for pipes and files...). I now made this a global, so that
semantics are the same as previously. Not really nice, but probably
the best thing to do in the current situation (everything else would
involve much more overhead --- leave that for the new config system).
2010-03-01 07:33:09 +01:00
Rainer Gerhards
f12a1995e4 bugfix: fixed problem that caused compilation on FreeBSD 9.0 to fail.
bugtracker: http://bugzilla.adiscon.com/show_bug.cgi?id=181
Thanks to Christiano for reporting.
2010-02-28 18:33:08 +01:00
Michael Biebl
8750f48390 Description: Correct error in rsyslog.conf(5) man page
$InputUDPServerRun config variable does not exist, should be $UDPServerRun
instead http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571202

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2010-02-28 18:24:06 +01:00
Rainer Gerhards
791d8ea863 some code cleanup 2010-02-28 17:28:52 +01:00
Rainer Gerhards
50636ba267 moved pipe code to its own module
... based on old omfile. Michael Biebl reported that xconsole seems
to have some issues with the new pipe code, so it was best to use
the old code for pipes. The optimizations were done to speed up file
access, so it doesn't really matter pipes do not receive them.
2010-02-28 17:18:04 +01:00
Rainer Gerhards
af5fb078d4 message parser fixes and testbench enhancements
- improved testbench to contain samples for totally malformed messages
  which miss parts of the message content
- bugfix: some malformed messages could lead to a missing LF inside files
  or some other missing parts of the template content.
- bugfix: if a message ended immediately with a hostname, the hostname
  was mistakenly interpreted as TAG, and localhost be used as hostname
2010-02-22 14:25:56 +01:00
Rainer Gerhards
c577e9c64c bugfix: message without MSG part could case a segfault
[backported from v5 commit 98d1ed504ec001728955a5bcd7916f64cd85f39f]
This actually was a "recent" regression, but I did not realize that it
was introduced by the performance optimization in v4-devel. Shame on
me for having two devel versions at the same time...
2010-02-22 09:31:10 +01:00
Rainer Gerhards
ef193bf0ae Merge branch 'v4-stable' into v4-beta 2010-02-04 16:43:21 +01:00
varmojfekoj
8c3ab2e26f bugfix: several smaller bugs resolved after flexelint review
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2010-02-04 16:02:57 +01:00
Cristiano
66d129c9ca (slightly) enhanced support for FreeBSD by setting _PATH_MODDIR to the correct value on FreeBSD.
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2010-02-03 15:42:14 +01:00
Rainer Gerhards
bd03b86c63 bugfix: -d did not enable display of debug messages
regression from introduction of "debug on demand" mode
Thanks to Michael Biebl for reporting this bug
2010-01-19 15:49:26 +01:00
Rainer Gerhards
9a0e844c91 Merge branch 'v4-stable' into v4-beta 2010-01-19 14:39:55 +01:00
Michael Biebl
112b69d983 Fix a typo regarding syslog.h and syslog(3)
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2010-01-19 14:39:24 +01:00
Rainer Gerhards
5b4e06fc28 bugfix: rsyslog hangs when writing to a named pipe which nobody was reading.
Thanks to Michael Biebl for reporting this bug.
2010-01-15 17:01:10 +01:00
Naoya Nakazawa
009738a0ac fixed a memory leak when sending messages in zip-compressed format
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2010-01-11 12:34:46 +01:00
Rainer Gerhards
a65f638523 Merge branch 'v4-stable' into v4-beta 2009-12-04 13:14:14 +01:00
Rainer Gerhards
44ee165390 Merge branch 'v3-stable' into v4-stable 2009-12-04 13:13:12 +01:00
Rainer Gerhards
8021912232 bugfix: potential segfault when -p command line option was used
thanks to varmojfekoj for pointing me at this bug
2009-12-04 13:11:50 +01:00
Rainer Gerhards
4cc7a7c16c Merge branch 'v4-stable' into v4-beta 2009-11-30 11:51:32 +01:00
Rainer Gerhards
cf1275d846 Merge branch 'v3-stable' into v4-stable 2009-11-30 11:51:20 +01:00
Rainer Gerhards
7b40604e9a bugfix: $CreateDirs variable not properly initialized
default thus was random (but most often "on")
2009-11-30 11:50:57 +01:00
Rainer Gerhards
2a1d97263f Merge branch 'v4-stable' into v4-beta 2009-11-17 09:41:00 +01:00
Rainer Gerhards
d8b3669e6d Merge branch 'v3-stable' into v4-stable
Conflicts:
	doc/rsyslog_conf.html
	runtime/net.c
2009-11-17 09:40:43 +01:00
Rainer Gerhards
8aec830cf5 Merge branch 'v4-stable' into v4-beta 2009-11-12 14:46:58 +01:00
Rainer Gerhards
f6dfcc7c3d correcting -q/-Q patch - was invalid
This is the correct patch. The previous one solved the segfault, but
disabled the -q/Q options.
2009-11-12 14:21:53 +01:00
Rainer Gerhards
bedc903ae0 Merge branch 'v3-stable' into v4-stable 2009-11-12 14:10:00 +01:00
Rainer Gerhards
e4542eb926 bugfix: segfault on startup when -q or -Q option was given
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=157
Thanks to Jonas Nogueira for reporting this bug.
2009-11-12 14:07:12 +01:00
Rainer Gerhards
2b5e15d549 added a so-called "On Demand Debug" mode
in which debug output can be generated only after the process has started,
but not right from the beginning. This is assumed to be useful for
hard-to-find bugs.  Also improved the doc on the debug system.
2009-11-10 12:50:48 +01:00
Rainer Gerhards
a5cd509be7 bugfix: named pipes did no longer work (they always got an open error)
this was a regression from the omfile rewrite in 4.5.0
2009-11-05 12:44:57 +01:00
Rainer Gerhards
e6b2cba803 bugfix(minor): diag function returned wrong queue memeber count
...for the main queue if an active DA queue existed. This had no relevance
to real deployments (assuming they are not running the debug/diagnostic
module...), but sometimes caused grief and false alerts in the
testbench.
2009-10-14 11:16:43 +02:00
Rainer Gerhards
2f35a69a59 Merge branch 'aaron' into v4-beta 2009-10-05 12:41:10 +02:00
Rainer Gerhards
0d7521d591 bugfix: invalid storage class selected for some size config parameters.
This resulted in wrong values. The most prominent victim was the
directory creation mode, which was set to zero in some cases. For
details, see related blog post:
http://blog.gerhards.net/2009/10/another-note-on-hard-to-find-bugs.html

This replaces the improper bugfix from two commits ago with a proper one.
2009-10-05 12:38:40 +02:00
Rainer Gerhards
36bfaf6348 DirCreateMode was always zero. work-around now is to do a...
one-time write to the mode, then all works. However, if no such write
is done, the variable always remains zero. I have used the memory
debugger as well as shuffled the code around and used guard variables
nothing changed. The problem always moved with the changes I did. So
I now consider the one-time write a usable work-around, because it
definitely fixes the issue even though it does not explain why it
happens.
2009-10-02 15:48:37 +02:00
Rainer Gerhards
d33a486560 Merge branch 'v4-stable' into v4-beta
Conflicts:
	runtime/rsyslog.h
	tools/syslogd.c
2009-10-01 17:00:07 +02:00
Rainer Gerhards
cb97616276 RFC5424 formatted messages with only structured data and no MSG part were improperly handled.
This was a regression of one of the last bugfixes, so no previously released
version contained this bug (thus it does not show up in the ChangeLog).
2009-10-01 16:54:34 +02:00
Rainer Gerhards
176f773a2e Merge branch 'v4-stable' into v4-beta & BUGFIX
Conflicts:
	configure.ac
	doc/manual.html
	runtime/datetime.h
	runtime/parser.c
	runtime/rsyslog.h
	tools/syslogd.c

v4-stable had a bug with RFC5424-formatted structured data, which showed
was detected by the enhanced automatted testbench of v4-beta.
2009-10-01 16:30:32 +02:00
Rainer Gerhards
37ba1df6e3 bugfix: random data could be appended to message, possibly causing segfaults 2009-09-24 09:48:38 +02:00
Rainer Gerhards
6d8df12597 Merge branch 'v3-stable' into v4-stable
Conflicts:
	doc/rsyslog_conf.html
2009-09-04 15:17:23 +02:00
Rainer Gerhards
7aa30acc74 bugfix (backport): omfwd segfault
Note that the orginal (higher version) patch states this happens only
when debugging mode is turned on. That statement is wrong: if debug
mode is turned off, the message is not being emitted, but the division
by zero in the actual parameters still happens.
2009-08-27 12:10:44 +02:00
Rainer Gerhards
bd7542b515 Merge branch 'v4.3.2' (v4-beta) into v4-stable
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	tests/Makefile.am
2009-08-21 10:19:56 +02:00
Rainer Gerhards
daa76ad944 bugfix: hostnames with dashes in them were incorrectly treated as malformed
... thus causing them to be treated as TAG (this was a regression
introduced from the "rfc3164 strict" change in 4.5.0).
2009-08-20 14:22:33 +02:00
Rainer Gerhards
b103d86392 Merge branch 'v4-beta' into v4-devel 2009-07-15 14:06:09 +02:00
Rainer Gerhards
cc8ef1a154 bugfix: memory leak with some input modules 2009-07-15 14:05:39 +02:00
Rainer Gerhards
ff6f2b1cc0 Merge branch 'v4-beta' into v4-devel 2009-07-15 11:17:14 +02:00
Rainer Gerhards
e983d1a422 Merge branch 'v3-stable' into v4-beta 2009-07-15 10:20:24 +02:00
Rainer Gerhards
b6340c7714 removed mentioning HUP as a way of restarting from the doc set
... part of the deprecation effort for v5
2009-07-15 10:19:23 +02:00