2835 Commits

Author SHA1 Message Date
Rainer Gerhards
d7faed130c bugfix(cosmetic): tried to close non-open fd, resulting in close(-1) 2010-03-16 19:06:01 +01:00
Rainer Gerhards
a577b09e58 reduced runtime requirements of inactive debug code a slight bit 2010-03-16 19:01:22 +01:00
Rainer Gerhards
16cb5ae53c enhanced dbgoprint() buffer size 2010-03-16 17:06:21 +01:00
Rainer Gerhards
219336ec5a bugfix: recent patch to fix small memory leak could cause invalid free.
This could only happen during config file parsing.
2010-03-16 17:02:49 +01:00
Rainer Gerhards
4cb3e80152 added new, complex testcase to testbench
this is an excerpt from some of the more intensen manual tests
I am doing, stripped down to be useful inside the testbench.
2010-03-16 14:23:13 +01:00
Rainer Gerhards
46861a84f8 fix recently introduced minor nit in Makefile for testbench 2010-03-15 09:36:02 +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
4f97db43df added more parser test cases
also improved testing tools to support new testcase structure
2010-03-11 14:48:44 +01:00
Rainer Gerhards
83c15bb0a0 added more tests to testbench and improved testing tools 2010-03-11 12:36:21 +01:00
Rainer Gerhards
5106cbe466 added ability to work with larger message sizes to testbench tools 2010-03-10 12:19:51 +01:00
Rainer Gerhards
4408d4137a testbench: new calling interface for tcpflood
this is a perquisite to support more flexible testing modes, which
could not intelligently be implemented with the old interface
2010-03-10 11:07:26 +01:00
Rainer Gerhards
ee8bf6d687 Merge branch 'v4-stable' into v4-stable-next 2010-03-10 09:58:46 +01:00
Rainer Gerhards
6c43f93022 fixed regression introduced with previous commit
disk queue mode did no longer work correctly. A side-effect of
this commit here is slightly cleaned-up (and more elegant) code
for circular files.
2010-03-10 09:52:49 +01:00
Rainer Gerhards
8833612e75 some cosmetic changes
note that a buffer size calculation was done wrong, but this was cosmetic
because our buffers currently all use byte size, so even though the
formula was wrong, the result was correct.
2010-03-10 08:21:41 +01:00
Rainer Gerhards
5996414f04 bugfixes and testbench improvement
- improved testbench
- bugfix: potential data loss during file stream shutdown
- bugfix: potential problems during file stream shutdown
  The shutdown/close sequence was not clean, what potentially (but
  unlikely) could lead to some issues. We have not been able to describe
  any fatal cases, but there was some bug potential. Sequence has now
  been straighted out.
2010-03-10 07:36:38 +01:00
Rainer Gerhards
3d80d6ba30 bugfix: potential problem (loop, abort) when file write error occured
When a write error occured in stream.c, variable iWritten had the error
code but this was handled as if it were the actual number of bytes
written. That was used in pointer arithmetic later on, and thus could
lead to all sorts of problems. However, this could only happen if the
error was EINTR or the file in question was a tty. All other cases were
handled properly. Now, iWritten is reset to zero in such cases, resulting
in proper retries.
2010-03-09 18:07:31 +01:00
Rainer Gerhards
7916735ba6 retain old $OMFileFlushOnTXEnd semantics
required because due to bug the default was actually different than
specified (or better said: spec was inconsistent in doc as well).
2010-03-09 17:57:46 +01:00
Rainer Gerhards
9e0426da5f bugfix: $omfileFlushOnTXEnd was turned on when set to off and vice versa 2010-03-09 17:52:01 +01:00
Rainer Gerhards
d97ad63e21 added new property replacer option "date-rfc3164-buggyday"
primarily to ease migration from syslog-ng. See property replacer doc for
details. [backport from 5.5.3 because urgently needed by some]
2010-03-08 17:56:11 +01:00
Rainer Gerhards
0b84d47f7a prepared 4.6.1 v4.6.1 2010-03-04 11:42:21 +01:00
Cristiano
4c060687cf streamlined BSD utmpx.h patch
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2010-03-04 09:51:28 +01:00
Rainer Gerhards
ad8ec0577a cosmetic: ChangeLog update
including proper credits to Mandriva team.
2010-03-04 09:27:36 +01:00
Yann Droneaud
71ffb32ab8 Fix Large File Support (LFS) support (bug #182)
- _FILE_OFFSET_BITS must be defined before including any other system
headers otherwise it does nothing.

- Don't define it in rsyslog.h, let it be defined in config.h,
  and let ./configure script enable LFS since Autoconf provides
  a portable macro to enable LFS support : AC_SYS_LARGEFILE
2010-03-04 09:01:04 +01:00
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
d080ffe467 reordered some include, because otherwise we get zlib-related errors
on some platforms (namely Debian sid). This smells like a bug in zlib.
Thanks to Michael Biebl for reporting the issue.
2010-03-03 09:24:40 +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
af6c73439e cosmetic: bugfix in ChangeLog highlighted 2010-03-01 12:51:15 +01:00
Rainer Gerhards
facf8cc3e6 Merge branch 'v3-stable' into v4-stable
Conflicts:
	runtime/ctok.c
2010-03-01 12:47:28 +01:00
Rainer Gerhards
01e6df368c bugfix: comment char ('#') in literal terminated script parsing
...and thus could not be used.
but tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=119
2010-03-01 12:44:57 +01:00
Rainer Gerhards
f9ec561e6e cleanup: removed debug messages that accidently made it into the commit 2010-03-01 08:41:00 +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
76ded5e98b doc bugfix: ChangeLog heading claimed that 4.6.0 was v4-beta
while the rest of the entry correctly said it was stable.
2010-02-25 10:09:47 +01:00
Rainer Gerhards
8e027749b9 preparing for 4.6.0 release v4.6.0 2010-02-24 10:22:54 +01:00
Rainer Gerhards
605701700a doc update: added link to "rsyslog cookbook" 2010-02-23 14:10:38 +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
f764f24baa updated rsyslog/php-syslog-ng doc, now that phpLogCon has evolved so much 2010-02-17 15:45:56 +01:00
Rainer Gerhards
76b3f2cd87 preparing for 4.5.8 v4.5.8 2010-02-10 15:26:27 +01:00
Rainer Gerhards
b1a1181720 minor doc fix: wrong default
... that clearly showed I could not do my math ;)
2010-02-09 17:51:23 +01:00
Rainer Gerhards
dd2e1a6906 fixed a small memory leak during config file parsing 2010-02-09 17:47:16 +01:00
Rainer Gerhards
b5e44445f9 added one more test to testbench 2010-02-08 18:35:27 +01:00
Rainer Gerhards
eff5630ec0 enhanced test suite
now CSV and regex extraction are being tested (would have caught the
bug fixed with the last commit).
2010-02-08 17:28:58 +01:00
Rainer Gerhards
e1584b71f3 several bugfixes for the property replacer
- bugfix: property replacer returned invalid parameters under some (unusual)
  conditions. In extreme cases, this could lead to garbled logs and/or
  a system failure.
- bugfix: invalid length returned (often) when using regular expressions
  inside the property replacer
- bugfix: submatch regex in property replacer did not honor "return 0 on
  no match" config case
2010-02-08 16:53:30 +01:00
Rainer Gerhards
c34e7d2114 integrated new PostgreSQL doc
converted to html, linked, etc...
2010-02-08 14:30:08 +01:00