30 Commits

Author SHA1 Message Date
Benoit DOLEZ
bfc3a053b3 pmrfc3164: Add remove.MsgFirstSpace option
This option permit automatic removing of the first space in rfc3164 logs.
That permit parsing of RFC3339 & RFC3164 to work in a same way.
2017-02-14 14:41:06 +01:00
Benoit DOLEZ
6096bc503f pmrfc3164: Add force.TagEndingByColon option
This option allow to check that log contains a real tag of the form
"PROG[\[PID\]]:". Without one, the tag is a dash ('-') without colon.
2017-02-14 14:41:06 +01:00
Julien Thomas
27e078a3bf pmrfc3164: Add support for at-signs in hostname
This commit adds support for new parameter permit.AtSignsInHostname
to allow at-signs characters in hostname rfc3164 BSD field. The parameter
value default to 0. The patch is similar to the one introduced by
Rainer Gerhards <rgerhards@adiscon.com> in 8.20.0 to support slashes
characters in hostnames.

Slashes and at-signs may be inserted by syslog-ng at least on 3.2 when
it runs with use_dns(no), keep_hostname(no) and chain_hostnames(yes).
The at-sign may happen when the syslog-ng host sends local logs in rfc3164
format. In that senario, the hostname field is prefixed by the source
name and an at-sign character.
As for the slash character, it is inserted by syslog-ng to chain
hostnames and ip addresses accross relays.
2017-02-14 14:41:06 +01:00
Pascal Withopf
b63a6b9010 codestyle: line length adjusted 2017-01-17 08:54:37 +01:00
Rainer Gerhards
c9dace7d9d Merge pull request #1215 from mostolog/fix1190
Honor parseHostnameAndTag
2016-12-02 13:12:49 +01:00
purnima
d45daa2af0 Rebase,redefine msgDestruct() as smsg_t is used 2016-11-22 14:24:25 +05:30
mostolog
f01e694710 Change pmrfc3164 to initialize parseHostnameAndTag fixing #1190 2016-10-21 10:02:57 +02:00
Rainer Gerhards
2bbe16b3c0 pmrfc3164: add support for slashes in hostname
added parameter "permit.slashesinhostname" to support this
2016-07-11 08:41:43 +02:00
Rainer Gerhards
18e26d25b3 cleanup: potential memory leak
This patch solves some issues the clang static analyzer shows. There
are three false positives in regard to getopt() handling, which we have
"fixed" anyhow. Also, we fix some memory leaks that are primarily cosmetic
because they are so small they would not affect actual processing. Also,
they are very very extremely unlikely.
2015-11-30 09:09:45 +01:00
Michael Biebl
91b6954331 typo fix: paramter → parameter
Followup fix for 6fbacdc41d37ce3091709e71f6f0e66912237606
2015-06-30 18:07:09 +02:00
Rainer Gerhards
06e8be3e06 cosmetic: fix compiler warning
fixes a warning about potential uninitialized use. However, the warning
was invalid and based on incomplete static code analysis. Anyhow, we
"fix" it, as this does not add any real overhead - and it's nicer to
compile cleanly.
2015-05-18 11:55:28 +02:00
Rainer Gerhards
e63f13058b pmrfc3164: add optional support for square brackets in HOSTNAME field
to cover e.g. "[127.0.0.1]". Only bracketing is supported, no brackets
inside the name.
2015-04-20 14:17:40 +02:00
Rainer Gerhards
3454658803 pmrfc3164: add capability to accept year after time in timestamp
This is done by Aruba Networks equipment.
2015-04-20 11:52:29 +02:00
Rainer Gerhards
c374cce103 Merge branch 'v7-stable' into v8-stable
Conflicts:
	ChangeLog
	configure.ac
2014-10-02 08:13:49 +02:00
Rainer Gerhards
3755b21992 do not try to parse messages with invalid facility (RFC3164 mode) 2014-10-01 11:41:09 +02:00
Rainer Gerhards
4da700873e pmciscoiso: support Nexus TZ string in date (but right now ignore it)
This does not longer give a parsing error, however, no information is right
now obtained from that TZ string.
2014-07-08 15:51:52 +02:00
Rainer Gerhards
55b8882550 update license to ASL 2.0
see also: https://github.com/rsyslog/rsyslog/issues/82
2014-05-22 12:22:07 +02:00
Rainer Gerhards
a8b1e96d7b Merge branch 'v7-stable-mmrfc5424addhmac'
Conflicts:
	Makefile.am
	configure.ac
	runtime/msg.c
	runtime/rsyslog.h
2013-09-26 12:41:50 +02:00
Rainer Gerhards
2d616c4097 consistently use new message protocol type #define's 2013-09-23 12:17:53 +02:00
Rainer Gerhards
177c77ca1e apply default TZ if none is present in legacy timestamp 2013-09-02 11:55:51 +02:00
Rainer Gerhards
d11e8221a8 milestone: defaultTZ can be set in msg obj (via imtcp)
... but parser does not yet use it.
2013-08-30 18:29:46 +02:00
Rainer Gerhards
144f0858b7 cleanup 2013-03-20 14:21:32 +01:00
Rainer Gerhards
439a5b70f2 improved support for --enable-debugless
Now it's probably time to prove the effect in practice...
2012-05-29 12:42:46 +02:00
Rainer Gerhards
9ec02e670a cleanup: removed unused but set parameters 2012-04-23 17:31:26 +02:00
Rainer Gerhards
645a8541d5 Merge branch 'v4-stable' into v5-stable
Conflicts:
	ChangeLog
	tools/syslogd.c
2011-08-30 15:35:02 +02:00
1697917525 Added debug output into message parsers needed for bugtracking
Changed version to 5.8.5-pre1
2011-08-12 14:48:43 +02: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
3644fb4b8a fully integrated parser fixes from v4.6.0
This also made necessary some parser test case updates. Acutally, the test
case was wrong, but I did not notice that before.
2010-02-25 14:23:02 +01:00
Rainer Gerhards
ef661fe13c finalized parser module calling interface
looks like we are almost done and need only to add the ruleset parser-specific
config options.
2009-11-04 11:33:09 +01:00
Rainer Gerhards
1b7f5c5468 moved rfc3164/5424 code to new parser modules
another milestone commit: the program works, the new interface
is used, some more cleanup is needed and the per-ruleset config
options are still missing. But we are getting closer...
2009-11-04 10:40:27 +01:00