463 Commits

Author SHA1 Message Date
Rainer Gerhards
9bbd09b1d3 cleanup: multiple rulesets inside a single batch are now OK
They don't require special handling any longer, so do no longer
care about them.
2013-11-04 18:33:31 +01:00
Rainer Gerhards
1f59e66eef milestone: calling sequence changed so that wti is passed to many functions 2013-10-26 17:56:04 +02:00
Rainer Gerhards
4acf8e361a make rsyslog version output include the number of bits used for RainerScript 2013-10-26 15:45:48 +02:00
Rainer Gerhards
32467b3bcd reload lookup tables on HUP 2013-07-16 15:07:24 +02:00
Rainer Gerhards
44a45748ce Merge branch 'v7-stable' 2013-06-15 10:15:00 +02:00
Cristian Rodríguez
b318386241 systemd: use service type notify
There is a time window, between rsyslog reporting syntax
errors and the daemon returning with failure, this may cause

systemctl restart rsyslog to not report any error inmediately
but later in the logs which is confusing to users.

The appropiate steps to correct this annoyance is to notify
systemd with a simple sd_notify(0, "READY=1"); just before
entering the main loop.

Tested in openSUSE 12.3/13.1 x86_64
2013-06-14 07:49:11 +02:00
Rainer Gerhards
f27cff39a3 Merge branch 'nextmaster'
Conflicts:
	ChangeLog
2013-06-06 11:55:23 +02:00
Tomas Heinrich
faeaaf2d6c Drop unneeded macro definition
The macro itself was a malformed version of "_GNU_SOURCE" and thus had
no effect. It is not needed as this macro is already defined
via AC_GNU_SOURCE.
2013-05-20 21:18:46 +02:00
Rainer Gerhards
415b26d5a1 enable shuffling of crypto parameters down through queue definition 2013-05-10 15:39:42 +02:00
Axel Rau
7369904b57 Add configurable local client IP 2013-05-06 17:42:17 +02:00
Rainer Gerhards
9c54bf41d0 bugfix: off-by-one error in handling local FQDN name (regression)
A remporary buffer was allocated one byte too small. Did only
affect startup, not actual operations. Came up during routine tests,
and can have no effect once the engine runs. Bug was introduced in
7.3.11.
2013-04-24 11:15:24 +02:00
Rainer Gerhards
d0cefac7a7 cleanup 2013-04-24 11:09:37 +02:00
Rainer Gerhards
56dbaf15fa Merge branch 'master-crypto'
Conflicts:
	ChangeLog
2013-04-17 08:56:45 +02:00
Louis Bouchard
89ace1e401 bugfix: $PreserveFQDN is not properly working
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=426
2013-04-17 08:52:17 +02:00
Rainer Gerhards
acd140f653 Merge branch 'c7' into tmp
Conflicts:
	ChangeLog
	configure.ac
	runtime/queue.c
2013-04-09 11:29:39 +02:00
Rainer Gerhards
86e34c6985 make imrelp properly terminate on system shutdown
it didn't do so if it was inside a retry loop
2013-04-09 10:54:04 +02:00
Rainer Gerhards
b78a7ba0af bugfix: stdout/stderr were not closed on forking
but were closed when running in the forground - this was just reversed
of what it should be. This is a regression of a recent change.

Conflicts:

	ChangeLog
2013-03-21 16:26:33 +01:00
Rainer Gerhards
cbe737ed06 bugfix: stdout/stderr were not closed on forking
but were closed when running in the forground - this was just reversed
of what it should be. This is a regression of a recent change.
2013-03-20 12:49:35 +01:00
Rainer Gerhards
0dab9aa0c4 fix merge problem 2013-03-18 13:57:42 +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
8aad93c582 imuxsock: add capability to ignore messages from ourselfes
This helps prevent message routing loops, and is vital to have
if omjournal is used together with traditional syslog.
2013-02-26 09:58:17 +01:00
Rainer Gerhards
35bec820b6 optimze: reduce memory operations during dns resolution/hostname setting
previously, hostname and ip strings were shuffled to the msg object, which
created a property out of them. Now the cache holds the property, and it
is resused (almost) everywhere, what saves a lot of memory operations.

The only exception is imtcp session setup, where different handling
of the hostname is done, which we need to sort out (but that's another
story).
2013-01-22 16:55:21 +01:00
Rainer Gerhards
0d71694fb3 optimize: have dns cache pre-create rsyslog prop_t's 2013-01-24 06:19:13 +01:00
Rainer Gerhards
eb5c7a0419 optimize: reduce nbr of strcpy() in FROMHOST processing 2013-01-18 14:40:41 +01:00
Rainer Gerhards
9273b4bb4d optimize memory layout for much better cache hits
Moave element status out of batch_obj_t because we
get a *much* better cache hit ratio this way.
Note that this is really a HUGE saving, even if it
doesn't look so (both profiler data as well as
practical tests indicate that!).
2013-01-15 15:01:16 +01:00
Rainer Gerhards
3352d2c605 minor cleanup 2012-12-14 09:20:51 +01:00
Rainer Gerhards
42d1d27a01 Merge branch 'v7-stable-newmsglock' into master-newmsglock
Conflicts:
	runtime/msg.c
	runtime/queue.c
	tools/syslogd.c
2012-12-06 17:27:37 +01:00
Rainer Gerhards
27e0f06b17 Merge branch 'v6-stable-newmsglock' into v7-stable-newmsglock
Conflicts:
	tools/syslogd.c
2012-12-06 17:03:51 +01:00
Rainer Gerhards
3495720a2f bugfix: some message properties could be garbled due to race condition
This happened only on very high volume systems, if the same message was
being processed by two different actions. This was a regression caused
by the new config processor, which did no longer properly enable msg
locking in multithreaded cases. The bugfix is actually a refactoring of
the msg locking code - we no longer do unlocked operations, as the use
case for it has mostly gone away. It is potentially possible only at
very low-end systems, and there the small additional overhead of doing
the locking does not really hurt. Instead, the removal of that
capability can actually slightly improve performance in common cases,
as the code path is smaller and requires slightly less memory writes.
That probably outperforms the extra locking overhead (which in the
low-end case always happens in user space, without need for kernel
support as we can always directly aquire the lock - there is no
contention at all).
2012-12-06 15:40:15 +01:00
Rainer Gerhards
62f6a7d7b4 fix missing functionality: ruleset(){} could not specify ruleset queue
The "queue.xxx" parameter set was not supported, and legacy ruleset
config statements did not work (by intention). The fix introduces the
"queue.xxx" parameter set. It has some regression potential, but only
for the new functionality. Note that using that interface it is possible
to specify duplicate queue file names, which will cause trouble. This
will be solved in v7.3, because there is a too-large regression
potential for the v7.2 stable branch.
2012-11-30 17:09:28 +01:00
Rainer Gerhards
7182c6def3 silence compiler warnings
the changes do not affect actual code execution, just keep the
compile log clean.
2012-11-30 12:57:26 +01:00
Rainer Gerhards
4798bd8daf Merge branch 'v7-stable' 2012-11-22 12:41:30 +01:00
Rainer Gerhards
8f61bf333c Merge branch 'v6-stable' into tmp 2012-11-22 12:22:30 +01:00
oxpa
e95584a204 bugfix: hostname set in rsyslog.conf was not picked up until HUP
which could also mean "never" or "not for a very long time".
2012-11-22 12:21:07 +01:00
Rainer Gerhards
b69e45aaaa Merge branch 'v7-stable' 2012-11-09 12:22:41 +01:00
Rainer Gerhards
8b5f57a2c6 enabled to build without libuuid, at loss of uuid functionality
this enables smoother builds on older systems that do not support
libuuid. Loss of functionality should usually not matter too much as
uuid support has only recently been added and is very seldom used.
2012-11-09 08:52:27 +01:00
Rainer Gerhards
c55e0a5a06 queue: change generic msg ptr (pUsr) to be of msg_t type 2012-11-03 12:32:50 +01:00
Rainer Gerhards
e711dc6e6b Merge branch 'master-ratelimit' 2012-10-30 14:59:01 +01:00
Rainer Gerhards
0d762b7509 add -D rsyslogd option to enable config parser debug mode 2012-10-27 14:41:56 +02:00
Rainer Gerhards
99d6dc01d2 rate-limit rsyslog internal messages
a special ratelimiter is used; it's linux-type ratelimit settings
are currently hardcoded
2012-10-23 17:12:09 +02:00
Rainer Gerhards
04ccff727d Merge branch 'master' into master-ratelimit
Conflicts:
	ChangeLog
2012-10-23 11:24:25 +02:00
Rainer Gerhards
3d41da36b8 remove "last message repeated n times" from rsyslog output part 2012-10-23 11:22:56 +02:00
Rainer Gerhards
95fefbc12a prepare for 7.20 stable release & minor things
The most important real code chane is the initialization of the
epoll control set. This should just be cosmetic (valgrind warnings),
as all data we actually use already was properly initialized.
2012-10-22 11:21:01 +02:00
Rainer Gerhards
9516e8f99f ratelimit: add default ratelimiter 2012-10-19 11:01:37 +02:00
Rainer Gerhards
fb53a0420f cleanup 2012-10-19 10:04:59 +02:00
Rainer Gerhards
e65473e9a4 Merge branch 'master' into master-ratelimit
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
2012-10-19 09:39:29 +02:00
Rainer Gerhards
e544df3f39 Merge branch 'v6-stable' into v6-beta 2012-10-17 16:55:57 +02:00
Rainer Gerhards
75079d9519 Merge branch 'v6-stable' into beta
Conflicts:
	rsyslog.service.in
2012-10-16 18:59:53 +02:00
Rainer Gerhards
bdc609639e cleanup: removed remains of -c option (compatibility mode)
both from code & doc and emitted warning message if still used
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=361
Thanks to Michael Biebl for reporting & suggestions
2012-10-16 18:58:11 +02:00