131 Commits

Author SHA1 Message Date
Rainer Gerhards
df4e90f602 Merge branch 'v5.8.13-prifix' into v5-stable-prifix
Conflicts:
	plugins/imklog/imklog.c
	plugins/imklog/ksym.c
	runtime/rule.c
2014-09-16 12:43:29 +02:00
Rainer Gerhards
2a9f4e6030 Merge branch 'v5.8.6-prifix' into v5.8.13-prifix
Conflicts:
	plugins/imklog/imklog.c
2014-09-16 12:11:09 +02:00
Rainer Gerhards
20a8056ac7 fix compile problems and cleanup
most importantly, we do no longer use the LOG_FAC() and LOG_PRI() macro
names, which may conflict with systems names and may act other than
expected by a user.
2014-09-16 11:46:41 +02:00
Rainer Gerhards
750824186d Merge branch 'v5.8.6-prifix' into v5.8.13-prifix 2014-09-15 17:22:59 +02:00
Rainer Gerhards
cd6937f35b do not accept out of bounds PRI values
further reference: CVE-2014-3634
2014-09-15 15:10:40 +02:00
Rainer Gerhards
b78af2aaf5 bugfix: imklog mistakenly took kernel timestamp subseconds as nanoseconds
... actually, they are microseconds. So the fractional part of the
timestamp was not properly formatted.
Thanks to Marius Tomaschwesky for the bug report and the patch idea.
2012-11-22 08:57:57 +01:00
Marius Tomaschewski
f040bde7a0 imklog: added $klogParseKernelTimestamp option
When enabled, kernel message [timestamp] is converted for message time.
Default is to use receive time as in 5.8.x and before, because the clock
used to create the timestamp is not supposed to be as accurate as the
monotonic clock (depends on hardware and kernel) resulting in differences
between kernel and system messages which occurred at same time.
2012-11-21 18:15:00 +01:00
Marius Tomaschewski
318a6fb577 imklog: added $klogKeepKernelTimestamp option
When enabled, the kernel [timestamp] remains at begin of
each message, even it is used for the message time too.
2012-11-21 18:13:48 +01:00
Marius Tomaschewski
d4f9c384c2 imklog: use memmove instead of memcpy (solaris) 2012-10-17 15:04:43 +02:00
Marius Tomaschewski
51754401f7 imklog: use memmove to remove kernel timestamp 2012-10-17 14:47:27 +02:00
Marius Tomaschewski
49a5c0c3b9 imklog: skip leading spaces in kernel timestamp 2012-10-17 14:46:35 +02:00
Rainer Gerhards
d53016962d Merge branch 'v5-stable-newstats' into v5-devel
Conflicts:
	configure.ac
	doc/manual.html
2012-04-07 14:44:12 +02:00
Rainer Gerhards
1d6d534df2 unified use of $LocalHostIPIF among all locally-emitting inputs
with the exception of imdiag, which I humbly do not think needs this
capabilit (even counter-productive for testbench use).
2012-03-22 16:06:57 +01:00
Rainer Gerhards
f90675f33f Merge branch 'v5-stable-newstats' into v5-devel
Conflicts:
	ChangeLog
	action.c
	configure.ac
	doc/imuxsock.html
	doc/manual.html
	runtime/queue.c
2012-03-12 17:00:21 +01:00
Rainer Gerhards
50a94aa1c7 added capability to use a local interface IP address as fromhost-ip for imklog 2012-03-10 18:29:40 +01:00
Rainer Gerhards
115718de96 Merge branch 'v5-stable' into v5-devel
Conflicts:
	ChangeLog
	plugins/imklog/imklog.c
	plugins/imklog/imklog.h
2012-03-01 12:25:39 +01:00
Rainer Gerhards
c2970de8b0 bugfix: imklog invalidly computed facility and severity
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=313
2012-03-01 12:19:32 +01:00
Rainer Gerhards
aafa9b41a5 bugfix: imklog invalidly computed facility and severity
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=313
2012-03-01 12:16:59 +01:00
Rainer Gerhards
2c172dcf82 Merge branch 'v4-stable' into v5-stable 2012-01-27 12:50:19 +01:00
Rainer Gerhards
cca05921dc imklog: forgot to remove one file; now done 2012-01-23 18:06:26 +01:00
Rainer Gerhards
01405d78f4 refactored imklog linux driver, now combined with BSD driver
The Linux driver no longer supports outdated kernel symbol resolution,
which was disabled by default for very long. Also overall cleanup,
resulting in much smaller code. Linux and BSD are now covered by a
single small driver.
2012-01-23 18:05:07 +01:00
Rainer Gerhards
0b5980df01 licensing change 2012-01-21 17:41:15 +01:00
Rainer Gerhards
8162ff020d preparing for 5.9.1 release 2011-06-30 10:09:03 +02:00
Rainer Gerhards
47729f3b93 added support for obtaining timestamp for kernel message from message
If the kernel time-stamps messages, time is now take from that
timestamp instead of the system time when the message was read. This
provides much better accuracy. Thanks to Lennart Poettering for
suggesting this feature and his help during implementation.
2011-06-24 17:07:11 +02:00
Rainer Gerhards
bb67fd7fbf experimental: support for systemd-induced second PRI in klog
if systemd writes a kernel log entry with a non-kernel priority,
the priority recorded in the kernel log will be wrong. However,
it will be immediately followed by another priority (with the
kernel timestamp in between, if enabled). So imklog now tries
to see if there is a second PRI and, if so, uses it. Note that
we already support non-kernel PRIs in the kernel log, as this
was done in BSD for quite some while. HOWEVER the config
statement "$klogpermitnonkernelfacility on" must be used to
permit this (otherwise non kernel messages are dropped).
Sample of a such a message on a kernel without timestamping
enabled:

$ echo '<14>text' > /dev/kmsg
$ dmesg -r
<4><14>text

NOTE: support for timestamp is NOT YET ENABLED!
2011-03-18 14:21:09 +01:00
Bojan Smojver
d1eb6e0edc added work-around for bug in gtls, which causes fd leak when using TLS
The capability has been added for module to specify that they do not
like being unloaded.
related bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=222

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2011-02-23 11:25:43 +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
ed36822e37 Merge branch 'v4-stable' into v5-stable
Conflicts:

	configure.ac
	runtime/cfsysline.c
	tools/ompipe.c
2010-10-19 12:54:38 +02:00
Rainer Gerhards
ec339c9097 Merge branch 'v4-stable' into v4-devel
Conflicts:

	runtime/cfsysline.c
	tools/ompipe.c
2010-10-19 12:44:22 +02:00
Rainer Gerhards
0a24b3afc0 fixing some compile problems on FreeBSD 2010-10-19 12:39:48 +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
b00e7946e8 first version of imsolaris created, cleanup for solaris done
more cleanup required, but things now basically work
2010-04-15 17:59:38 +02:00
Rainer Gerhards
2a8d484a73 some cleanup of solaris imklog 2010-04-12 17:09:50 +02:00
Rainer Gerhards
87a957b0f5 Merge branch 'v4-stable-solaris' into beta
Conflicts:
	runtime/Makefile.am
	runtime/rsyslog.c
	tests/nettester.c
	tools/syslogd.c
2010-04-09 12:27:59 +02:00
Rainer Gerhards
23a3fdb094 git "bugfix": added file previously forgotten 2010-04-01 15:16:05 +02:00
Rainer Gerhards
3ab759c40d cleanup in solaris components for imklog 2010-03-26 16:59:00 +01:00
Rainer Gerhards
91a5e176d6 added initial files for door support & fixed imklog
imklog now basically works, but needs quite some more work to do
2010-03-26 15:49:39 +01:00
Rainer Gerhards
ee6ce30b47 interim commit: imklog/solaris compiles, but does not work
saving this area of work, because some further clarification
is needed. Do not try to run the current imklog, it will fail.
2010-03-26 09:14:31 +01:00
Rainer Gerhards
da65d88017 added forgotten file 2010-03-25 18:36:27 +01:00
Rainer Gerhards
92369b253c added some starting point for a solaris imklog driver
... far from being functional at this time!
2010-03-25 18:22:14 +01:00
Rainer Gerhards
e04e1b5002 enhanced test environment (including testbench)
support for enhancing probability of memory addressing failure by
using non-NULL default value for malloced memory (optional, only if
requested by configure option). This helps to track down some
otherwise undetected issues within the testbench and is expected
to be very useful in the future.
2009-10-22 11:33:38 +02:00
Rainer Gerhards
05b0c4322b removed no longer needed msg_t property "bParseHOSTNAME" 2009-10-13 07:29:11 +02:00
Rainer Gerhards
da933a7e10 added $klogConsoleLogLevel directive
...which permits to set a new console log level while rsyslog is active
2009-07-03 11:57:21 +02:00
Rainer Gerhards
7bfa03bdc0 now put the new property-based methods to good use
... hopefully reducing the number of allocs/frees as well as overall
memory usage in a busy system (plus that these shared properties hopefully
remain in cache longer than its single-instance counterparts...)
2009-07-01 14:33:19 +02:00
Rainer Gerhards
d6faee67b4 RcvFromIP now also a property
This sets stage to enable use of the property-interface to speed
up things (mildly), the next step to be done. I have also fixed one
regression of yesterday's changes.
2009-07-01 13:28:17 +02:00
Rainer Gerhards
aaffc4281e introduced a new way of handling the RcvFrom property
... plus a fix for a long-time bug in obj-types.h. That lead to
the object pointer only then to become NULL when the object was
actually destructed, I discovered this issue during
introduction of the pRcvFrom property in msg_t, but it potentially had other
effects, too. I am not sure if some experienced instability resulted from this
bug OR if its fix will cause harm to so-far "correctly" running code. The later
may very well be. Thus I will change it only for the current branch and also
the beta, but not in all old builds. Let's see how things evolve.
2009-06-30 18:45:41 +02:00
Rainer Gerhards
e397c34d2a finished transition to using inputName property
... plus some celanup and adding minor missing functionality
(the rule debug info again tell the property name, not just number).
2009-06-30 15:21:15 +02:00
Rainer Gerhards
de84a12f8a introduced the idea of detached properties
some things inside the message can be used over a large number of
messages and need to to be allocated and re-written every time. I now
begin to implement this as a "prop_t" object, first use for the inputName.
Some input modules are already converted, some others to go. Will do
a little performance check on the new method before I go further.

Also, this commit has some cleanup and a few bug fixes that prevented
compiliation in debug mode (I overlooked this as I did not compile
for debug, what I normally do, and the automatted test also does not
do that)
2009-06-29 16:53:26 +02:00