Date: Wed, 2 Apr 2008 13:13:12 +0000
Subject: updated status informatation and syslog-ng comparison
---
doc/rsyslog_ng_comparison.html | 178 +++++++++++++++++++++++++----------------
doc/status.html | 16 +++-
2 files changed, 120 insertions(+), 74 deletions(-)
diff --git a/doc/rsyslog_ng_comparison.html b/doc/rsyslog_ng_comparison.html
index 547501af..2a1d15bd 100644
--- a/doc/rsyslog_ng_comparison.html
+++ b/doc/rsyslog_ng_comparison.html
@@ -1,6 +1,8 @@
-rsyslog vs. syslog-ng - a comparison
+rsyslog vs. syslog-ng - a comparison
+
+
rsyslog vs. syslog-ng
Written by Rainer Gerhards
@@ -25,56 +27,72 @@ comparison sheet, so please don't be shy ;)
rsyslog |
syslog-ng |
-
-
- Input Sources
|
+
+Input Sources
+ |
-UNIX domain socket |
+
+UNIX domain socket |
+yes |
yes |
-yes |
- |
+ |
+
UDP |
yes |
-yes |
- |
+yes |
+ |
+
TCP |
yes |
-yes |
- |
+yes |
+ |
+
+
+RELP |
+yes |
+no |
+ |
+
RFC 3195/BEEP |
yes (needs separate build process) |
-no |
- |
+no |
+ |
+
kernel log |
yes |
-yes |
- |
+yes |
+ |
+
file |
yes |
-yes |
- |
+yes |
+ |
+
-mark message generator as an optional input |
+mark message generator as an
+optional input |
yes |
-no (?) |
- |
+no (?) |
+ |
+
Windows Event Log |
via EventReporter
or MonitorWare Agent
(both commercial software) |
-via separate Windows agent, paid edition only |
+via separate Windows agent, paid
+edition only |
-
-
- Network (Protocol) Support
|
+
+Network (Protocol) Support
+ |
support for (plain) tcp based syslog |
@@ -104,6 +122,11 @@ based framing on syslog/tcp connections
yes |
+syslog over RELP this is a truely reliable solution (plain tcp syslog can lose messages!) |
+yes |
+no |
+
+
on the wire (zlib) message
compression |
yes |
@@ -146,38 +169,46 @@ hostname in NAT environments and relay chains
yes |
yes |
-
-
- Message Filtering
|
+
+Message Filtering
+ |
-Filtering for syslog facility and priority |
+
+Filtering for syslog facility and
+priority |
yes |
-yes |
- |
+yes |
+ |
+
Filtering for hostname |
yes |
-yes |
- |
+yes |
+ |
+
Filtering for application |
yes |
-yes |
- |
+yes |
+ |
+
Filtering for message contents |
yes |
-yes |
- |
+yes |
+ |
+
Filtering for sending IP address |
yes |
-yes |
- |
+yes |
+ |
+
-ability to filter on any other message
-field not mentioned above
+ | ability to filter on any other
+message
+field not mentioned above
(including substrings and the like) |
yes |
no |
@@ -210,8 +241,9 @@ in filters
support for discarding messages
based on filters |
yes |
-yes |
- |
+yes |
+ |
+
powerful BSD-style hostname and
program name blocks for easy multi-host support |
@@ -223,10 +255,10 @@ program name blocks for easy multi-host support
|
|
-
-
- Supported Database Outputs
|
+
+Supported Database Outputs
+ |
MySQL |
@@ -274,10 +306,10 @@ program name blocks for easy multi-host support
yes (omlibdbi) |
no (?) |
-
-
- Enterprise Features
|
+
+Enterprise Features
+ |
support for on-demand on-disk
@@ -292,7 +324,8 @@ by spool files |
yes |
-each action can use its own, independant
+ | each action can use its own,
+independant
set of spool files |
yes |
no |
@@ -314,10 +347,10 @@ syslog/database servers
yes |
yes |
-
-
- Config File
|
+
+Config File
+ |
config file format |
@@ -338,37 +371,40 @@ existing in a specific directory
yes |
no |
-
-
-
- Extensibility
|
+
+Extensibility
+ |
-Functionality split in separately loadable
+ | Functionality split in separately
+loadable
modules |
yes |
no |
-Support for third-party input plugins |
+Support for third-party input
+plugins |
yes |
no |
-Support for third-party output plugins |
+
+Support for third-party output
+plugins |
yes |
no |
-
-
-
- Other Features
|
+
+Other Features
+ |
+
+
-
ability to generate file names and
directories (log targets) dynamically |
yes |
@@ -440,8 +476,9 @@ reduction ("last message repeated n times") on a per selector-line basis
supports multiple actions per
selector/filter condition |
yes |
-yes |
- |
+yes |
+ |
+
web interface |
phpLogCon
@@ -469,8 +506,11 @@ system stress |
flow control
(slow down message reception when system is busy) |
-yes (advanced, with multiple ways to slow down inputs depending on individual input capabilities, based on watermarks) |
-yes (limited? "stops accepting messages") |
+yes (advanced,
+with multiple ways to slow down inputs depending on individual input
+capabilities, based on watermarks) |
+yes (limited?
+"stops accepting messages") |
rewriting messages |
@@ -504,8 +544,6 @@ Solaris; compilation and basic testing done on HP UX
no |
yes |
-
-
While the rsyslog
diff --git a/doc/status.html b/doc/status.html
index c76fe348..b9bfd5c6 100644
--- a/doc/status.html
+++ b/doc/status.html
@@ -8,12 +8,20 @@
development: 3.15.0 -
change log -
download
+
+v3 stable: 3.14.0 - change log -
+download
+
+
v2 stable: 2.0.4 - change log -
+download
+
v0 and v1 are depricated and no longer supported. If you absolutely do not like to
+upgrade, you may consider purchasing a
+commercial rsyslog support package. Just let us point
+out that it is really not a good idea to still run a v0 version.
+
If you updgrade from version 2, be sure to read the rsyslog v3
compatibility document.
-
-stable: 2.0.4 - change log -
-download
- (How are versions named?)
+(How are versions named?)
Platforms
Thankfully, a number of folks have begin to build packages and
--
cgit v1.2.3
From baf9a567599ada3da4b14f913fa4b10d0aabf03c Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Wed, 2 Apr 2008 14:42:49 +0000
Subject: updated version information in man pages
---
rfc3195d.8 | 2 +-
rsyslog.conf.5 | 2 +-
rsyslogd.8 | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/rfc3195d.8 b/rfc3195d.8
index e585bc2c..ae191df6 100644
--- a/rfc3195d.8
+++ b/rfc3195d.8
@@ -1,7 +1,7 @@
.\" Copyright 2005 Rainer Gerhards and Adiscon for the rsyslog modifications
.\" Distributed under the GNU General Public License.
.\"
-.TH RSYSLOGD 8 "03 July 2007" "Version 1.14.2 (devel)" "Linux System Administration"
+.TH RFC3195D 8 "02 April 2008" "Version 3.14.0" "Linux System Administration"
.SH NAME
rfc3195d \- RFC 3195 listener
.SH SYNOPSIS
diff --git a/rsyslog.conf.5 b/rsyslog.conf.5
index e673e490..d7116678 100644
--- a/rsyslog.conf.5
+++ b/rsyslog.conf.5
@@ -17,7 +17,7 @@
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
.\"
-.TH RSYSLOG.CONF 5 "28 March 2008" "Version 3.12.5" "Linux System Administration"
+.TH RSYSLOG.CONF 5 "02 April 2008" "Version 3.14.0" "Linux System Administration"
.SH NAME
rsyslog.conf \- rsyslogd(8) configuration file
.SH DESCRIPTION
diff --git a/rsyslogd.8 b/rsyslogd.8
index 353fb4c0..28fa6bb1 100644
--- a/rsyslogd.8
+++ b/rsyslogd.8
@@ -1,7 +1,7 @@
.\" Copyright 2004-2008 Rainer Gerhards and Adiscon for the rsyslog modifications
.\" May be distributed under the GNU General Public License
.\"
-.TH RSYSLOGD 8 "28 March 2008" "Version 3.12.5 (devel)" "Linux System Administration"
+.TH RSYSLOGD 8 "02 April 2008" "Version 3.14.0" "Linux System Administration"
.SH NAME
rsyslogd \- reliable and extended syslogd
.SH SYNOPSIS
--
cgit v1.2.3
From f1c9f5da133f4c6c8b52c5948cc0f61e32c210f1 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 3 Apr 2008 08:48:25 +0000
Subject: bugfix: memory leaks in script engine
---
ChangeLog | 1 +
conf.c | 6 ++++++
obj.h | 1 -
queue.c | 2 ++
syslogd.c | 15 ++++++++++++---
var.c | 28 +++++++++++++++++++++-------
vm.c | 5 ++---
vmop.c | 6 ++++++
vmstk.c | 2 --
9 files changed, 50 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 99fcc50f..aef28847 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ Version 3.14.0 (rgerhards), 2008-04-02
Michael Biebl for pointing these problems out.
- disabled atomic operations for this stable build as it caused
platform problems
+- bugfix: memory leaks in script engine
---------------------------------------------------------------------------
Version 3.13.0-dev0 (rgerhards), 2008-03-31
- bugfix: accidently set debug option in 3.12.5 reset to production
diff --git a/conf.c b/conf.c
index f3f10ba3..65d76d63 100644
--- a/conf.c
+++ b/conf.c
@@ -68,6 +68,7 @@ static rsRetVal processConfFile(uchar *pConfFile);
DEFobjStaticHelpers
DEFobjCurrIf(expr)
DEFobjCurrIf(ctok)
+DEFobjCurrIf(ctok_token)
DEFobjCurrIf(module)
DEFobjCurrIf(errmsg)
DEFobjCurrIf(net)
@@ -762,9 +763,12 @@ dbgprintf("calling expression parser, pp %p ('%s')\n", *pline, *pline);
*/
CHKiRet(ctok.GetToken(tok, &pToken));
if(pToken->tok != ctok_THEN) {
+ ctok_token.Destruct(&pToken);
ABORT_FINALIZE(RS_RET_SYNTAX_ERROR);
}
+ ctok_token.Destruct(&pToken); /* no longer needed */
+
/* we are done, so we now need to restore things */
CHKiRet(ctok.Getpp(tok, pline));
CHKiRet(ctok.Destruct(&tok));
@@ -1183,6 +1187,7 @@ CODESTARTObjClassExit(conf)
/* release objects we no longer need */
objRelease(expr, CORE_COMPONENT);
objRelease(ctok, CORE_COMPONENT);
+ objRelease(ctok_token, CORE_COMPONENT);
objRelease(module, CORE_COMPONENT);
objRelease(errmsg, CORE_COMPONENT);
objRelease(net, LM_NET_FILENAME);
@@ -1197,6 +1202,7 @@ BEGINAbstractObjClassInit(conf, 1, OBJ_IS_CORE_MODULE) /* class, version - CHANG
/* request objects we use */
CHKiRet(objUse(expr, CORE_COMPONENT));
CHKiRet(objUse(ctok, CORE_COMPONENT));
+ CHKiRet(objUse(ctok_token, CORE_COMPONENT));
CHKiRet(objUse(module, CORE_COMPONENT));
CHKiRet(objUse(errmsg, CORE_COMPONENT));
CHKiRet(objUse(net, LM_NET_FILENAME));
diff --git a/obj.h b/obj.h
index a9d676d5..87c6c91d 100644
--- a/obj.h
+++ b/obj.h
@@ -92,7 +92,6 @@
/* interfaces */
BEGINinterface(obj) /* name must also be changed in ENDinterface macro! */
- //rsRetVal (*UseObj)(char *srcFile, uchar *pObjName, uchar *pMyLib, uchar *pObjFile, interface_t *pIf);
rsRetVal (*UseObj)(char *srcFile, uchar *pObjName, uchar *pObjFile, interface_t *pIf);
rsRetVal (*ReleaseObj)(char *srcFile, uchar *pObjName, uchar *pObjFile, interface_t *pIf);
rsRetVal (*InfoConstruct)(objInfo_t **ppThis, uchar *pszID, int iObjVers,
diff --git a/queue.c b/queue.c
index ed720c55..7ae5815d 100644
--- a/queue.c
+++ b/queue.c
@@ -2208,6 +2208,8 @@ rsRetVal queueQueryInterface(void) { return RS_RET_NOT_IMPLEMENTED; }
*/
BEGINObjClassInit(queue, 1, OBJ_IS_CORE_MODULE)
/* request objects we use */
+DEFpropSetMeth(queue, iDeqtWinFromHr, int);
+DEFpropSetMeth(queue, iDeqtWinToHr, int);
/* now set our own handlers */
OBJSetMethodHandler(objMethod_SETPROPERTY, queueSetProperty);
diff --git a/syslogd.c b/syslogd.c
index 1c31fb61..4bed94c8 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -170,6 +170,7 @@ DEFobjCurrIf(datetime)
DEFobjCurrIf(conf)
DEFobjCurrIf(expr)
DEFobjCurrIf(vm)
+DEFobjCurrIf(var)
DEFobjCurrIf(module)
DEFobjCurrIf(errmsg)
DEFobjCurrIf(net) /* TODO: make go away! */
@@ -928,8 +929,8 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce
unsigned short pbMustBeFreed;
char *pszPropVal;
int bRet = 0;
- vm_t *pVM;
- var_t *pResult;
+ vm_t *pVM = NULL;
+ var_t *pResult = NULL;
assert(f != NULL);
assert(pMsg != NULL);
@@ -995,7 +996,7 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce
CHKiRet(vm.ExecProg(pVM, f->f_filterData.f_expr->pVmprg));
CHKiRet(vm.PopBoolFromStack(pVM, &pResult));
dbgprintf("result of expression evaluation: %lld\n", pResult->val.num);
- CHKiRet(vm.Destruct(&pVM));
+ /* VM is destructed on function exit */
bRet = (pResult->val.num) ? 1 : 0;
} else {
assert(f->f_filter_type == FILTER_PROP); /* assert() just in case... */
@@ -1051,6 +1052,12 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce
}
finalize_it:
+ /* destruct in any case, not just on error, but it makes error handling much easier */
+ if(pVM != NULL) {
+ var.Destruct(&pResult);
+ vm.Destruct(&pVM);
+ }
+
*bProcessMsg = bRet;
RETiRet;
}
@@ -2838,6 +2845,8 @@ InitGlobalClasses(void)
/* initialize and use classes. We must be very careful with the order of events. Some
* classes use others and if we do not initialize them in the right order, we may end
* up with an invalid call. The most important thing that can happen is that an error
+ pErrObj = "var";
+ CHKiRet(objUse(var, CORE_COMPONENT));
* is detected and needs to be logged, wich in turn requires a broader number of classes
* to be available. The solution is that we take care in the order of calls AND use a
* class immediately after it is initialized. And, of course, we load those classes
diff --git a/var.c b/var.c
index c1d66643..7de00d88 100644
--- a/var.c
+++ b/var.c
@@ -63,12 +63,11 @@ rsRetVal varConstructFinalize(var_t __attribute__((unused)) *pThis)
BEGINobjDestruct(var) /* be sure to specify the object type also in END and CODESTART macros! */
CODESTARTobjDestruct(var)
if(pThis->pcsName != NULL)
- d_free(pThis->pcsName);
+ rsCStrDestruct(&pThis->pcsName);
if(pThis->varType == VARTYPE_STR) {
if(pThis->val.pStr != NULL)
- d_free(pThis->val.pStr);
+ rsCStrDestruct(&pThis->val.pStr);
}
-
ENDobjDestruct(var)
@@ -192,10 +191,16 @@ ConvToNumber(var_t *pThis)
} else if(pThis->varType == VARTYPE_STR) {
iRet = rsCStrConvertToNumber(pThis->val.pStr, &n);
if(iRet == RS_RET_NOT_A_NUMBER) {
- n = 0; /* TODO: isn't it better to pass the error? */
+ n = 0;
+ iRet = RS_RET_OK; /* we accept this as part of the language definition */
} else if (iRet != RS_RET_OK) {
FINALIZE;
}
+
+ /* we need to destruct the string first, because string and number are
+ * inside a union and share the memory area! -- rgerhards, 2008-04-03
+ */
+ rsCStrDestruct(&pThis->val.pStr);
pThis->val.num = n;
pThis->varType = VARTYPE_NUMBER;
@@ -244,7 +249,18 @@ ConvToBool(var_t *pThis)
if(pThis->varType == VARTYPE_NUMBER) {
FINALIZE;
} else if(pThis->varType == VARTYPE_STR) {
- CHKiRet(rsCStrConvertToBool(pThis->val.pStr, &n));
+ iRet = rsCStrConvertToBool(pThis->val.pStr, &n);
+ if(iRet == RS_RET_NOT_A_NUMBER) {
+ n = 0;
+ iRet = RS_RET_OK; /* we accept this as part of the language definition */
+ } else if (iRet != RS_RET_OK) {
+ FINALIZE;
+ }
+
+ /* we need to destruct the string first, because string and number are
+ * inside a union and share the memory area! -- rgerhards, 2008-04-03
+ */
+ rsCStrDestruct(&pThis->val.pStr);
pThis->val.num = n;
pThis->varType = VARTYPE_NUMBER;
}
@@ -366,8 +382,6 @@ CODESTARTobjQueryInterface(var)
* work here (if we can support an older interface version - that,
* of course, also affects the "if" above).
*/
- //xxxpIf->oID = OBJvar;
-
pIf->Construct = varConstruct;
pIf->ConstructFinalize = varConstructFinalize;
pIf->Destruct = varDestruct;
diff --git a/vm.c b/vm.c
index 3cd05622..a26e4331 100644
--- a/vm.c
+++ b/vm.c
@@ -109,8 +109,6 @@ BEGINop(name) \
number_t bRes; \
CODESTARTop(name) \
CHKiRet(vmstk.Pop2CommOp(pThis->pStk, &operand1, &operand2)); \
-var.DebugPrint(operand1); \
-var.DebugPrint(operand2); \
/* data types are equal (so we look only at operand1), but we must \
* check which type we have to deal with... \
*/ \
@@ -122,7 +120,6 @@ var.DebugPrint(operand2); \
} \
\
/* we have a result, so let's push it */ \
-RUNLOG_VAR("%lld", bRes); \
var.SetNumber(operand1, bRes); \
vmstk.Push(pThis->pStk, operand1); /* result */ \
var.Destruct(&operand2); /* no longer needed */ \
@@ -374,6 +371,8 @@ BEGINobjDestruct(vm) /* be sure to specify the object type also in END and CODES
CODESTARTobjDestruct(vm)
if(pThis->pStk != NULL)
vmstk.Destruct(&pThis->pStk);
+ if(pThis->pMsg != NULL)
+ msgDestruct(&pThis->pMsg);
ENDobjDestruct(vm)
diff --git a/vmop.c b/vmop.c
index affa83e7..91f84b91 100644
--- a/vmop.c
+++ b/vmop.c
@@ -59,6 +59,12 @@ rsRetVal vmopConstructFinalize(vmop_t __attribute__((unused)) *pThis)
/* destructor for the vmop object */
BEGINobjDestruct(vmop) /* be sure to specify the object type also in END and CODESTART macros! */
CODESTARTobjDestruct(vmop)
+ if( pThis->opcode == opcode_PUSHSYSVAR
+ || pThis->opcode == opcode_PUSHMSGVAR
+ || pThis->opcode == opcode_PUSHCONSTANT) {
+ if(pThis->operand.pVar != NULL)
+ var.Destruct(&pThis->operand.pVar);
+ }
ENDobjDestruct(vmop)
diff --git a/vmstk.c b/vmstk.c
index 9ca815ff..f6614f71 100644
--- a/vmstk.c
+++ b/vmstk.c
@@ -201,8 +201,6 @@ CODESTARTobjQueryInterface(vmstk)
* work here (if we can support an older interface version - that,
* of course, also affects the "if" above).
*/
- //xxxpIf->oID = OBJvmstk;
-
pIf->Construct = vmstkConstruct;
pIf->ConstructFinalize = vmstkConstructFinalize;
pIf->Destruct = vmstkDestruct;
--
cgit v1.2.3
From d0ca3acbf971141b8826d0bb3a184eaadb2804c1 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 3 Apr 2008 08:49:09 +0000
Subject: bugfix: memory leaks in script engine
---
ChangeLog | 1 +
conf.c | 6 ++++++
obj.h | 1 -
queue.c | 2 ++
syslogd.c | 15 ++++++++++++---
var.c | 28 +++++++++++++++++++++-------
vm.c | 5 ++---
vmop.c | 6 ++++++
vmstk.c | 2 --
9 files changed, 50 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3c20f16b..66994c28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ Version 3.15.1 (rgerhards), 2008-04-??
- file relputil.c deleted, is not actually needed
- added more meaningful error messages to rsyslogd (when some errors
happens during startup)
+- bugfix: memory leaks in script engine
---------------------------------------------------------------------------
Version 3.15.0 (rgerhards), 2008-04-01
- major new feature: imrelp/omrelp support reliable delivery of syslog
diff --git a/conf.c b/conf.c
index 14e73f0e..f87ab992 100644
--- a/conf.c
+++ b/conf.c
@@ -68,6 +68,7 @@ static rsRetVal processConfFile(uchar *pConfFile);
DEFobjStaticHelpers
DEFobjCurrIf(expr)
DEFobjCurrIf(ctok)
+DEFobjCurrIf(ctok_token)
DEFobjCurrIf(module)
DEFobjCurrIf(errmsg)
DEFobjCurrIf(net)
@@ -762,9 +763,12 @@ dbgprintf("calling expression parser, pp %p ('%s')\n", *pline, *pline);
*/
CHKiRet(ctok.GetToken(tok, &pToken));
if(pToken->tok != ctok_THEN) {
+ ctok_token.Destruct(&pToken);
ABORT_FINALIZE(RS_RET_SYNTAX_ERROR);
}
+ ctok_token.Destruct(&pToken); /* no longer needed */
+
/* we are done, so we now need to restore things */
CHKiRet(ctok.Getpp(tok, pline));
CHKiRet(ctok.Destruct(&tok));
@@ -1183,6 +1187,7 @@ CODESTARTObjClassExit(conf)
/* release objects we no longer need */
objRelease(expr, CORE_COMPONENT);
objRelease(ctok, CORE_COMPONENT);
+ objRelease(ctok_token, CORE_COMPONENT);
objRelease(module, CORE_COMPONENT);
objRelease(errmsg, CORE_COMPONENT);
objRelease(net, LM_NET_FILENAME);
@@ -1197,6 +1202,7 @@ BEGINAbstractObjClassInit(conf, 1, OBJ_IS_CORE_MODULE) /* class, version - CHANG
/* request objects we use */
CHKiRet(objUse(expr, CORE_COMPONENT));
CHKiRet(objUse(ctok, CORE_COMPONENT));
+ CHKiRet(objUse(ctok_token, CORE_COMPONENT));
CHKiRet(objUse(module, CORE_COMPONENT));
CHKiRet(objUse(errmsg, CORE_COMPONENT));
CHKiRet(objUse(net, LM_NET_FILENAME)); /* TODO: make this dependcy go away! */
diff --git a/obj.h b/obj.h
index a9d676d5..87c6c91d 100644
--- a/obj.h
+++ b/obj.h
@@ -92,7 +92,6 @@
/* interfaces */
BEGINinterface(obj) /* name must also be changed in ENDinterface macro! */
- //rsRetVal (*UseObj)(char *srcFile, uchar *pObjName, uchar *pMyLib, uchar *pObjFile, interface_t *pIf);
rsRetVal (*UseObj)(char *srcFile, uchar *pObjName, uchar *pObjFile, interface_t *pIf);
rsRetVal (*ReleaseObj)(char *srcFile, uchar *pObjName, uchar *pObjFile, interface_t *pIf);
rsRetVal (*InfoConstruct)(objInfo_t **ppThis, uchar *pszID, int iObjVers,
diff --git a/queue.c b/queue.c
index ed720c55..7ae5815d 100644
--- a/queue.c
+++ b/queue.c
@@ -2208,6 +2208,8 @@ rsRetVal queueQueryInterface(void) { return RS_RET_NOT_IMPLEMENTED; }
*/
BEGINObjClassInit(queue, 1, OBJ_IS_CORE_MODULE)
/* request objects we use */
+DEFpropSetMeth(queue, iDeqtWinFromHr, int);
+DEFpropSetMeth(queue, iDeqtWinToHr, int);
/* now set our own handlers */
OBJSetMethodHandler(objMethod_SETPROPERTY, queueSetProperty);
diff --git a/syslogd.c b/syslogd.c
index 8c71f57d..b5554e5f 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -170,6 +170,7 @@ DEFobjCurrIf(datetime)
DEFobjCurrIf(conf)
DEFobjCurrIf(expr)
DEFobjCurrIf(vm)
+DEFobjCurrIf(var)
DEFobjCurrIf(module)
DEFobjCurrIf(errmsg)
DEFobjCurrIf(net) /* TODO: make go away! */
@@ -928,8 +929,8 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce
unsigned short pbMustBeFreed;
char *pszPropVal;
int bRet = 0;
- vm_t *pVM;
- var_t *pResult;
+ vm_t *pVM = NULL;
+ var_t *pResult = NULL;
assert(f != NULL);
assert(pMsg != NULL);
@@ -995,7 +996,7 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce
CHKiRet(vm.ExecProg(pVM, f->f_filterData.f_expr->pVmprg));
CHKiRet(vm.PopBoolFromStack(pVM, &pResult));
dbgprintf("result of expression evaluation: %lld\n", pResult->val.num);
- CHKiRet(vm.Destruct(&pVM));
+ /* VM is destructed on function exit */
bRet = (pResult->val.num) ? 1 : 0;
} else {
assert(f->f_filter_type == FILTER_PROP); /* assert() just in case... */
@@ -1051,6 +1052,12 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce
}
finalize_it:
+ /* destruct in any case, not just on error, but it makes error handling much easier */
+ if(pVM != NULL) {
+ var.Destruct(&pResult);
+ vm.Destruct(&pVM);
+ }
+
*bProcessMsg = bRet;
RETiRet;
}
@@ -2838,6 +2845,8 @@ InitGlobalClasses(void)
CHKiRet(objUse(errmsg, CORE_COMPONENT));
pErrObj = "module";
CHKiRet(objUse(module, CORE_COMPONENT));
+ pErrObj = "var";
+ CHKiRet(objUse(var, CORE_COMPONENT));
/* initialize and use classes. We must be very careful with the order of events. Some
* classes use others and if we do not initialize them in the right order, we may end
diff --git a/var.c b/var.c
index c1d66643..7de00d88 100644
--- a/var.c
+++ b/var.c
@@ -63,12 +63,11 @@ rsRetVal varConstructFinalize(var_t __attribute__((unused)) *pThis)
BEGINobjDestruct(var) /* be sure to specify the object type also in END and CODESTART macros! */
CODESTARTobjDestruct(var)
if(pThis->pcsName != NULL)
- d_free(pThis->pcsName);
+ rsCStrDestruct(&pThis->pcsName);
if(pThis->varType == VARTYPE_STR) {
if(pThis->val.pStr != NULL)
- d_free(pThis->val.pStr);
+ rsCStrDestruct(&pThis->val.pStr);
}
-
ENDobjDestruct(var)
@@ -192,10 +191,16 @@ ConvToNumber(var_t *pThis)
} else if(pThis->varType == VARTYPE_STR) {
iRet = rsCStrConvertToNumber(pThis->val.pStr, &n);
if(iRet == RS_RET_NOT_A_NUMBER) {
- n = 0; /* TODO: isn't it better to pass the error? */
+ n = 0;
+ iRet = RS_RET_OK; /* we accept this as part of the language definition */
} else if (iRet != RS_RET_OK) {
FINALIZE;
}
+
+ /* we need to destruct the string first, because string and number are
+ * inside a union and share the memory area! -- rgerhards, 2008-04-03
+ */
+ rsCStrDestruct(&pThis->val.pStr);
pThis->val.num = n;
pThis->varType = VARTYPE_NUMBER;
@@ -244,7 +249,18 @@ ConvToBool(var_t *pThis)
if(pThis->varType == VARTYPE_NUMBER) {
FINALIZE;
} else if(pThis->varType == VARTYPE_STR) {
- CHKiRet(rsCStrConvertToBool(pThis->val.pStr, &n));
+ iRet = rsCStrConvertToBool(pThis->val.pStr, &n);
+ if(iRet == RS_RET_NOT_A_NUMBER) {
+ n = 0;
+ iRet = RS_RET_OK; /* we accept this as part of the language definition */
+ } else if (iRet != RS_RET_OK) {
+ FINALIZE;
+ }
+
+ /* we need to destruct the string first, because string and number are
+ * inside a union and share the memory area! -- rgerhards, 2008-04-03
+ */
+ rsCStrDestruct(&pThis->val.pStr);
pThis->val.num = n;
pThis->varType = VARTYPE_NUMBER;
}
@@ -366,8 +382,6 @@ CODESTARTobjQueryInterface(var)
* work here (if we can support an older interface version - that,
* of course, also affects the "if" above).
*/
- //xxxpIf->oID = OBJvar;
-
pIf->Construct = varConstruct;
pIf->ConstructFinalize = varConstructFinalize;
pIf->Destruct = varDestruct;
diff --git a/vm.c b/vm.c
index 3cd05622..a26e4331 100644
--- a/vm.c
+++ b/vm.c
@@ -109,8 +109,6 @@ BEGINop(name) \
number_t bRes; \
CODESTARTop(name) \
CHKiRet(vmstk.Pop2CommOp(pThis->pStk, &operand1, &operand2)); \
-var.DebugPrint(operand1); \
-var.DebugPrint(operand2); \
/* data types are equal (so we look only at operand1), but we must \
* check which type we have to deal with... \
*/ \
@@ -122,7 +120,6 @@ var.DebugPrint(operand2); \
} \
\
/* we have a result, so let's push it */ \
-RUNLOG_VAR("%lld", bRes); \
var.SetNumber(operand1, bRes); \
vmstk.Push(pThis->pStk, operand1); /* result */ \
var.Destruct(&operand2); /* no longer needed */ \
@@ -374,6 +371,8 @@ BEGINobjDestruct(vm) /* be sure to specify the object type also in END and CODES
CODESTARTobjDestruct(vm)
if(pThis->pStk != NULL)
vmstk.Destruct(&pThis->pStk);
+ if(pThis->pMsg != NULL)
+ msgDestruct(&pThis->pMsg);
ENDobjDestruct(vm)
diff --git a/vmop.c b/vmop.c
index affa83e7..91f84b91 100644
--- a/vmop.c
+++ b/vmop.c
@@ -59,6 +59,12 @@ rsRetVal vmopConstructFinalize(vmop_t __attribute__((unused)) *pThis)
/* destructor for the vmop object */
BEGINobjDestruct(vmop) /* be sure to specify the object type also in END and CODESTART macros! */
CODESTARTobjDestruct(vmop)
+ if( pThis->opcode == opcode_PUSHSYSVAR
+ || pThis->opcode == opcode_PUSHMSGVAR
+ || pThis->opcode == opcode_PUSHCONSTANT) {
+ if(pThis->operand.pVar != NULL)
+ var.Destruct(&pThis->operand.pVar);
+ }
ENDobjDestruct(vmop)
diff --git a/vmstk.c b/vmstk.c
index 9ca815ff..f6614f71 100644
--- a/vmstk.c
+++ b/vmstk.c
@@ -201,8 +201,6 @@ CODESTARTobjQueryInterface(vmstk)
* work here (if we can support an older interface version - that,
* of course, also affects the "if" above).
*/
- //xxxpIf->oID = OBJvmstk;
-
pIf->Construct = vmstkConstruct;
pIf->ConstructFinalize = vmstkConstructFinalize;
pIf->Destruct = vmstkDestruct;
--
cgit v1.2.3
From 4419e1068aff9e88ed419f6439f577bb0960f7a0 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 3 Apr 2008 08:57:44 +0000
Subject: bugfix: $hostname and $fromhost in RainerScript did not work
---
ChangeLog | 1 +
msg.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index aef28847..5c60c5b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@ Version 3.14.0 (rgerhards), 2008-04-02
- disabled atomic operations for this stable build as it caused
platform problems
- bugfix: memory leaks in script engine
+- bugfix: $hostname and $fromhost in RainerScript did not work
---------------------------------------------------------------------------
Version 3.13.0-dev0 (rgerhards), 2008-03-31
- bugfix: accidently set debug option in 3.12.5 reset to production
diff --git a/msg.c b/msg.c
index 76ea2f72..7c020a61 100644
--- a/msg.c
+++ b/msg.c
@@ -1606,9 +1606,11 @@ char *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
pRes = getRawMsg(pMsg);
} else if(!strcmp((char*) pName, "UxTradMsg")) {
pRes = getUxTradMsg(pMsg);
- } else if(!strcmp((char*) pName, "FROMHOST")) {
+ } else if( !strcmp((char*) pName, "FROMHOST")
+ || !strcmp((char*) pName, "fromhost")) {
pRes = getRcvFrom(pMsg);
} else if(!strcmp((char*) pName, "source")
+ || !strcmp((char*) pName, "hostname")
|| !strcmp((char*) pName, "HOSTNAME")) {
pRes = getHOSTNAME(pMsg);
} else if(!strcmp((char*) pName, "syslogtag")) {
--
cgit v1.2.3
From 6b982c8e5dbfd54eff7e22291d7f63400ff3c555 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 3 Apr 2008 09:14:05 +0000
Subject: bugfix: $hostname and $fromhost in RainerScript did not work
---
ChangeLog | 1 +
msg.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 66994c28..21f330e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@ Version 3.15.1 (rgerhards), 2008-04-??
- added more meaningful error messages to rsyslogd (when some errors
happens during startup)
- bugfix: memory leaks in script engine
+- bugfix: $hostname and $fromhost in RainerScript did not work
---------------------------------------------------------------------------
Version 3.15.0 (rgerhards), 2008-04-01
- major new feature: imrelp/omrelp support reliable delivery of syslog
diff --git a/msg.c b/msg.c
index 76ea2f72..7c020a61 100644
--- a/msg.c
+++ b/msg.c
@@ -1606,9 +1606,11 @@ char *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
pRes = getRawMsg(pMsg);
} else if(!strcmp((char*) pName, "UxTradMsg")) {
pRes = getUxTradMsg(pMsg);
- } else if(!strcmp((char*) pName, "FROMHOST")) {
+ } else if( !strcmp((char*) pName, "FROMHOST")
+ || !strcmp((char*) pName, "fromhost")) {
pRes = getRcvFrom(pMsg);
} else if(!strcmp((char*) pName, "source")
+ || !strcmp((char*) pName, "hostname")
|| !strcmp((char*) pName, "HOSTNAME")) {
pRes = getHOSTNAME(pMsg);
} else if(!strcmp((char*) pName, "syslogtag")) {
--
cgit v1.2.3
From 4ec54f46166c33ee96bdc9d271b4a3610d6007bd Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 3 Apr 2008 13:56:36 +0000
Subject: bugfix: some memory leak when queue is runing in disk mode
---
ChangeLog | 1 +
obj.c | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5c60c5b8..3b86aaf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ Version 3.14.0 (rgerhards), 2008-04-02
platform problems
- bugfix: memory leaks in script engine
- bugfix: $hostname and $fromhost in RainerScript did not work
+- bugfix: some memory leak when queue is runing in disk mode
---------------------------------------------------------------------------
Version 3.13.0-dev0 (rgerhards), 2008-03-31
- bugfix: accidently set debug option in 3.12.5 reset to production
diff --git a/obj.c b/obj.c
index 0baaf7a1..d408c4bb 100644
--- a/obj.c
+++ b/obj.c
@@ -731,7 +731,7 @@ finalize_it:
static rsRetVal objDeserializeProperties(obj_t *pObj, objInfo_t *pObjInfo, strm_t *pStrm)
{
DEFiRet;
- var_t *pVar;
+ var_t *pVar = NULL;
ISOBJ_assert(pObj);
ISOBJ_TYPE_assert(pStrm, strm);
@@ -743,15 +743,23 @@ static rsRetVal objDeserializeProperties(obj_t *pObj, objInfo_t *pObjInfo, strm_
iRet = objDeserializeProperty(pVar, pStrm);
while(iRet == RS_RET_OK) {
CHKiRet(pObjInfo->objMethods[objMethod_SETPROPERTY](pObj, pVar));
+ /* re-init var object - TODO: method of var! */
+ rsCStrDestruct(&pVar->pcsName); /* no longer needed */
+ if(pVar->varType == VARTYPE_STR) {
+ if(pVar->val.pStr != NULL)
+ rsCStrDestruct(&pVar->val.pStr);
+ }
iRet = objDeserializeProperty(pVar, pStrm);
}
- var.Destruct(&pVar);
if(iRet != RS_RET_NO_PROPLINE)
FINALIZE;
CHKiRet(objDeserializeTrailer(pStrm)); /* do trailer checks */
finalize_it:
+ if(pVar != NULL)
+ var.Destruct(&pVar);
+
RETiRet;
}
--
cgit v1.2.3
From 61931c57c39de8d2dbeb0a6a6d27e2762e1821d4 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 3 Apr 2008 13:57:18 +0000
Subject: bugfix: some memory leak when queue is runing in disk mode
---
ChangeLog | 1 +
obj.c | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 21f330e7..40774e36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@ Version 3.15.1 (rgerhards), 2008-04-??
happens during startup)
- bugfix: memory leaks in script engine
- bugfix: $hostname and $fromhost in RainerScript did not work
+- bugfix: some memory leak when queue is runing in disk mode
---------------------------------------------------------------------------
Version 3.15.0 (rgerhards), 2008-04-01
- major new feature: imrelp/omrelp support reliable delivery of syslog
diff --git a/obj.c b/obj.c
index 0baaf7a1..d408c4bb 100644
--- a/obj.c
+++ b/obj.c
@@ -731,7 +731,7 @@ finalize_it:
static rsRetVal objDeserializeProperties(obj_t *pObj, objInfo_t *pObjInfo, strm_t *pStrm)
{
DEFiRet;
- var_t *pVar;
+ var_t *pVar = NULL;
ISOBJ_assert(pObj);
ISOBJ_TYPE_assert(pStrm, strm);
@@ -743,15 +743,23 @@ static rsRetVal objDeserializeProperties(obj_t *pObj, objInfo_t *pObjInfo, strm_
iRet = objDeserializeProperty(pVar, pStrm);
while(iRet == RS_RET_OK) {
CHKiRet(pObjInfo->objMethods[objMethod_SETPROPERTY](pObj, pVar));
+ /* re-init var object - TODO: method of var! */
+ rsCStrDestruct(&pVar->pcsName); /* no longer needed */
+ if(pVar->varType == VARTYPE_STR) {
+ if(pVar->val.pStr != NULL)
+ rsCStrDestruct(&pVar->val.pStr);
+ }
iRet = objDeserializeProperty(pVar, pStrm);
}
- var.Destruct(&pVar);
if(iRet != RS_RET_NO_PROPLINE)
FINALIZE;
CHKiRet(objDeserializeTrailer(pStrm)); /* do trailer checks */
finalize_it:
+ if(pVar != NULL)
+ var.Destruct(&pVar);
+
RETiRet;
}
--
cgit v1.2.3
From f71c32668773bd37892b4f587078b3aebc8c7949 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 3 Apr 2008 14:53:11 +0000
Subject: man pages improved thanks to varmofekoj and Peter Vrabec
---
ChangeLog | 1 +
rsyslog.conf.5 | 62 ++++++++++++++++++++++++++++-
rsyslogd.8 | 123 +++++++++++++++++++++++++++++++++++----------------------
3 files changed, 137 insertions(+), 49 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3b86aaf5..dc333afe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@ Version 3.14.0 (rgerhards), 2008-04-02
- bugfix: memory leaks in script engine
- bugfix: $hostname and $fromhost in RainerScript did not work
- bugfix: some memory leak when queue is runing in disk mode
+- man pages improved thanks to varmofekoj and Peter Vrabec
---------------------------------------------------------------------------
Version 3.13.0-dev0 (rgerhards), 2008-03-31
- bugfix: accidently set debug option in 3.12.5 reset to production
diff --git a/rsyslog.conf.5 b/rsyslog.conf.5
index d7116678..d672a692 100644
--- a/rsyslog.conf.5
+++ b/rsyslog.conf.5
@@ -17,7 +17,7 @@
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
.\"
-.TH RSYSLOG.CONF 5 "02 April 2008" "Version 3.14.0" "Linux System Administration"
+.TH RSYSLOG.CONF 5 "03 April 2008" "Version 3.14.0" "Linux System Administration"
.SH NAME
rsyslog.conf \- rsyslogd(8) configuration file
.SH DESCRIPTION
@@ -40,6 +40,66 @@ to look at the html documentation, because the man pages only cover
basic aspects of operation.
+.SH MODULES
+
+Rsyslog has a modular design. Consequently, there is a growing number
+of modules. See the html documentation for their full description.
+
+.TP
+.I omsnmp
+SNMP trap output module
+.TP
+.I omrelp
+RELP output module
+.TP
+.I omgssapi
+Output module for GSS-enabled syslog
+.TP
+.I ommysql
+Output module for MySQL
+.TP
+.I ompgsql
+Output module for PostgreSQL
+.TP
+.I omlibdbi
+Generic database output module (Firebird/Interbase, MS SQL, Sybase,
+SQLLite, Ingres, Oracle, mSQL)
+.TP
+.I imfile
+Input module for text files
+.TP
+.I imrelp
+RELP input module
+.TP
+.I imudp
+Input plugin for UDP syslog. Replaces the deprecated -r option. Can be
+used like this:
+.IP
+$ModLoad imudp
+.IP
+$InputUDPServerRun 514
+.TP
+.I imtcp
+Input plugin for plain TCP syslog. Replaces the deprecated -t
+option. Can be used like this:
+.IP
+$ModLoad imtcp
+.IP
+$InputTCPServerRun 514
+.TP
+.I imgssapi
+Input plugin for plain TCP and GSS-enable syslog
+.TP
+.I immark
+Dupport for mark messages
+.TP
+.I imklog
+Kernel logging
+.TP
+.I imuxsock
+Unix sockets, including the system log socket
+
+
.SH BASIC STRUCTURE
Lines starting with a hash mark ('#') and empty lines are ignored.
diff --git a/rsyslogd.8 b/rsyslogd.8
index 28fa6bb1..0125d589 100644
--- a/rsyslogd.8
+++ b/rsyslogd.8
@@ -45,6 +45,8 @@ To use rsyslog's advanced features, you
.B need
to look at the html documentation, because the man pages only cover
basic aspects of operation.
+.B For details and configuration examples, see the rsyslog.conf (5)
+.B man page and the online documentation at http://www.rsyslog.com/doc
.BR Rsyslogd (8)
is derived from the sysklogd package which in turn is derived from the
@@ -83,11 +85,11 @@ option, is read at startup. Any lines that begin with the hash mark
(``#'') and empty lines are ignored. If an error occurs during parsing
the error element is ignored. It is tried to parse the rest of the line.
-For details and configuration examples, see the
-.B rsyslog.conf (5)
-man page.
.LP
.SH OPTIONS
+.B Note that in version 3 of rsyslog a number of command line options
+.B have been deprecated and replaced with config file directives. The
+.B -c option controls the backward compatibility mode in use.
.TP
.BI "\-A"
When sending UDP messages, there are potentially multiple pathes to
@@ -114,6 +116,28 @@ If neither -4 nor -6 is given,
.B rsyslogd
listens to all configured addresses of the system.
.TP
+.BI "\-c " "version"
+Selects the desired backward compatibility mode. It must always be the
+first option on the command line, as it influences processing of the
+other options. To use the rsyslog v3 native interface, specify -c3. To
+use compatibility mode , either do not use -c at all or use
+-c where
+.IR version
+is the rsyslog version that it shall be
+compatible with. Using -c0 tells rsyslog to be command-line compatible
+to sysklogd, which is the default if -c is not given.
+.B Please note that rsyslogd issues warning messages if the -c3
+.B command line option is not given.
+This is to alert you that your are running in compatibility
+mode. Compatibility mode interfers with you rsyslog.conf commands and
+may cause some undesired side-effects. It is meant to be used with a
+plain old rsyslog.conf - if you use new features, things become
+messy. So the best advice is to work through this document, convert
+your options and config file and then use rsyslog in native mode. In
+order to aid you in this process, rsyslog logs every
+compatibility-mode config file directive it has generated. So you can
+simply copy them from your logfile and paste them to the config.
+.TP
.B "\-d"
Turns on debug mode. Using this the daemon will not proceed a
.BR fork (2)
@@ -214,51 +238,6 @@ debug option.
.B CHLD
Wait for childs if some were born, because of wall'ing messages.
.LP
-.SH SUPPORT FOR REMOTE LOGGING
-.B Rsyslogd
-provides network support to the syslogd facility.
-Network support means that messages can be forwarded from one node
-running rsyslogd to another node running rsyslogd (or a
-compatible syslog implementation).
-actually logged to a disk file.
-
-To enable this, proper configuration commands must
-be entered in rsyslog.conf. See the rsyslog.conf html
-documentation for details.
-
-The strategy is to have rsyslogd listen on a unix domain socket for
-locally generated log messages. This behavior will allow rsyslogd to
-inter-operate with the syslog found in the standard C library. At the
-same time rsyslogd listens on the standard syslog port for messages
-forwarded from other hosts.
-
-.SH OUTPUT TO DATABASES
-.B Rsyslogd
-has support for writing data to database tables. The exact specifics
-are described in the
-.B rsyslog.conf (5)
-html documentation. Be sure to read it if you plan to use database logging.
-
-.SH OUTPUT TO NAMED PIPES (FIFOs)
-.B Rsyslogd
-has support for logging output to named pipes
-(fifos). A fifo or named pipe can be used as a destination for log
-messages by prepending a pipy symbol (``|'') to the name of the
-file. This is handy for debugging. Note that the fifo must be created
-with the mkfifo command before
-.B rsyslogd
-is started.
-.IP
-The following configuration file routes debug messages from the
-kernel to a fifo:
-.IP
-.nf
- # Sample configuration to route kernel debugging
- # messages ONLY to /usr/adm/debug which is a
- # named pipe.
- kern.=debug |/usr/adm/debug
-.fi
-.LP
.SH SECURITY THREATS
There is the potential for the rsyslogd daemon to be
used as a conduit for a denial of service attack.
@@ -314,6 +293,54 @@ The Unix domain socket to from where local syslog messages are read.
.I /var/run/rsyslogd.pid
The file containing the process id of
.BR rsyslogd .
+.TP
+.I prefix/lib/rsyslog
+Default directory for
+.B rsyslogd
+modules. The
+.I prefix
+is specified during compilation (e.g. /usr/local).
+.SH ENVIRONMENT
+.TP
+.B RSYSLOG_DEBUG
+Controls runtime debug support.It contains an option string with the
+following options possible (all are case insensitive):
+
+.RS
+.IP LogFuncFlow
+Print out the logical flow of functions (entering and exiting them)
+.IP FileTrace
+Ppecifies which files to trace LogFuncFlow. If not set (the
+default), a LogFuncFlow trace is provided for all files. Set to
+limit it to the files specified.FileTrace may be specified multiple
+times, one file each (e.g. export RSYSLOG_DEBUG="LogFuncFlow
+FileTrace=vm.c FileTrace=expr.c"
+.IP PrintFuncDB
+Print the content of the debug function database whenever debug
+information is printed (e.g. abort case)!
+.IP PrintAllDebugInfoOnExit
+Print all debug information immediately before rsyslogd exits
+(currently not implemented!)
+.IP PrintMutexAction
+Print mutex action as it happens. Useful for finding deadlocks and
+such.
+.IP NoLogTimeStamp
+Do not prefix log lines with a timestamp (default is to do that).
+.IP NoStdOut
+Do not emit debug messages to stdout. If RSYSLOG_DEBUGLOG is not
+set, this means no messages will be displayed at all.
+.IP Help
+Display a very short list of commands - hopefully a life saver if
+you can't access the documentation...
+.RE
+
+.TP
+.B RSYSLOG_DEBUGLOG
+If set, writes (allmost) all debug message to the specified log file
+in addition to stdout.
+.TP
+.B RSYSLOG_MODDIR
+Provides the default directory in which loadable modules reside.
.PD
.SH BUGS
Please review the file BUGS for up-to-date information on known
--
cgit v1.2.3
From d90258ba84718cbff684a3d8eba22156c8487a1e Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 3 Apr 2008 16:41:22 +0000
Subject: removed accidently addded lines
---
queue.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/queue.c b/queue.c
index 7ae5815d..ed720c55 100644
--- a/queue.c
+++ b/queue.c
@@ -2208,8 +2208,6 @@ rsRetVal queueQueryInterface(void) { return RS_RET_NOT_IMPLEMENTED; }
*/
BEGINObjClassInit(queue, 1, OBJ_IS_CORE_MODULE)
/* request objects we use */
-DEFpropSetMeth(queue, iDeqtWinFromHr, int);
-DEFpropSetMeth(queue, iDeqtWinToHr, int);
/* now set our own handlers */
OBJSetMethodHandler(objMethod_SETPROPERTY, queueSetProperty);
--
cgit v1.2.3
From affcef6b121d9014eb7cc9c2bcfc20a2b0bcb2fd Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 3 Apr 2008 17:00:59 +0000
Subject: some more man updates
---
rsyslog.conf.5 | 35 ++++++++++++++++++++++++-----------
1 file changed, 24 insertions(+), 11 deletions(-)
diff --git a/rsyslog.conf.5 b/rsyslog.conf.5
index d672a692..3c42288c 100644
--- a/rsyslog.conf.5
+++ b/rsyslog.conf.5
@@ -49,9 +49,6 @@ of modules. See the html documentation for their full description.
.I omsnmp
SNMP trap output module
.TP
-.I omrelp
-RELP output module
-.TP
.I omgssapi
Output module for GSS-enabled syslog
.TP
@@ -68,9 +65,6 @@ SQLLite, Ingres, Oracle, mSQL)
.I imfile
Input module for text files
.TP
-.I imrelp
-RELP input module
-.TP
.I imudp
Input plugin for UDP syslog. Replaces the deprecated -r option. Can be
used like this:
@@ -91,13 +85,24 @@ $InputTCPServerRun 514
Input plugin for plain TCP and GSS-enable syslog
.TP
.I immark
-Dupport for mark messages
+Support for mark messages
.TP
.I imklog
-Kernel logging
+Kernel logging. To include kernel log messages, you need to do
+.IP
+$ModLoad imklog
+
+Please note that the klogd daemon is no longer necessary and consequently
+no longer provided by the rsyslog package.
.TP
.I imuxsock
-Unix sockets, including the system log socket
+Unix sockets, including the system log socket. You need to specify
+.IP
+$ModLoad imudp
+
+in order to receive log messages from local system processes. This
+config directive should only left out if you know exactly what you
+are doing.
.SH BASIC STRUCTURE
@@ -142,7 +147,16 @@ beginning with a slash ('/').
.B Example:
.RS
-*.* /var/log/traditionalfile.log;TraditionalFormat # log to a file in the traditional format
+*.* /var/log/traditionalfile.log;RSYSLOG_TraditionalFormat # log to a file in the traditional format
+.RE
+
+Note: if you would like to use high-precision timestamps in your log files,
+just remove the ";RSYSLOG_TraditionalFormat". That will select the default
+template, which, if not changed, uses RFC 3339 timestamps.
+
+.B Example:
+.RS
+*.* /var/log/file.log # log to a file with RFC3339 timestamps
.RE
.SS Named pipes
@@ -670,7 +684,6 @@ the html documentation for all features and details. This is especially vital if
up a more-then-extremely-simple system.
.SH AUTHORS
-The
.B rsyslogd
is taken from sysklogd sources, which have been heavily modified
by Rainer Gerhards (rgerhards@adiscon.com) and others.
--
cgit v1.2.3
From 6d306efe32d5d1efbfedbedf0177e469195592ad Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 06:24:29 +0000
Subject: added RELP doc to man pages
---
rsyslog.conf.5 | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
rsyslogd.8 | 125 ++++++++++++++++++++++++++++++++++----------------------
2 files changed, 195 insertions(+), 56 deletions(-)
diff --git a/rsyslog.conf.5 b/rsyslog.conf.5
index e673e490..e15a4549 100644
--- a/rsyslog.conf.5
+++ b/rsyslog.conf.5
@@ -17,7 +17,7 @@
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
.\"
-.TH RSYSLOG.CONF 5 "28 March 2008" "Version 3.12.5" "Linux System Administration"
+.TH RSYSLOG.CONF 5 "04 April 2008" "Version 3.15.0" "Linux System Administration"
.SH NAME
rsyslog.conf \- rsyslogd(8) configuration file
.SH DESCRIPTION
@@ -40,6 +40,94 @@ to look at the html documentation, because the man pages only cover
basic aspects of operation.
+.SH MODULES
+
+Rsyslog has a modular design. Consequently, there is a growing number
+of modules. See the html documentation for their full description.
+
+.TP
+.I omsnmp
+SNMP trap output module
+.TP
+.I omgssapi
+Output module for GSS-enabled syslog
+.TP
+.I ommysql
+Output module for MySQL
+.TP
+.I omprelp
+Output module for the reliable RELP protocol (prevents message loss).
+For details, see below at imrelp and the html documentation.
+It can be used like this:
+.IP
+*.* :omrelp:server:port
+.IP
+*.* :omrelp:192.168.0.1:2514 # actual sample
+.TP
+.I ompgsql
+Output module for PostgreSQL
+.TP
+.I omlibdbi
+Generic database output module (Firebird/Interbase, MS SQL, Sybase,
+SQLLite, Ingres, Oracle, mSQL)
+.TP
+.I imfile
+Input module for text files
+.TP
+.I imudp
+Input plugin for UDP syslog. Replaces the deprecated -r option. Can be
+used like this:
+.IP
+$ModLoad imudp
+.IP
+$InputUDPServerRun 514
+.TP
+.I imtcp
+Input plugin for plain TCP syslog. Replaces the deprecated -t
+option. Can be used like this:
+.IP
+$ModLoad imtcp
+.IP
+$InputTCPServerRun 514
+.TP
+.TP
+.I imtcp
+Input plugin for the RELP protocol. RELP can be used instead
+of UDP or plain TCP syslog to provide reliable delivery of
+syslog messages. Please note that plain TCP syslog does NOT
+provide truly reliable delivery, with it messages may be lost
+when there is a connection problem or the server shuts down.
+RELP prevents message loss in those cases.
+It can be used like this:
+.IP
+$ModLoad imrelp
+.IP
+$InputRELPServerRun 2514
+.TP
+.I imgssapi
+Input plugin for plain TCP and GSS-enable syslog
+.TP
+.I immark
+Support for mark messages
+.TP
+.I imklog
+Kernel logging. To include kernel log messages, you need to do
+.IP
+$ModLoad imklog
+
+Please note that the klogd daemon is no longer necessary and consequently
+no longer provided by the rsyslog package.
+.TP
+.I imuxsock
+Unix sockets, including the system log socket. You need to specify
+.IP
+$ModLoad imudp
+
+in order to receive log messages from local system processes. This
+config directive should only left out if you know exactly what you
+are doing.
+
+
.SH BASIC STRUCTURE
Lines starting with a hash mark ('#') and empty lines are ignored.
@@ -82,7 +170,16 @@ beginning with a slash ('/').
.B Example:
.RS
-*.* /var/log/traditionalfile.log;TraditionalFormat # log to a file in the traditional format
+*.* /var/log/traditionalfile.log;RSYSLOG_TraditionalFormat # log to a file in the traditional format
+.RE
+
+Note: if you would like to use high-precision timestamps in your log files,
+just remove the ";RSYSLOG_TraditionalFormat". That will select the default
+template, which, if not changed, uses RFC 3339 timestamps.
+
+.B Example:
+.RS
+*.* /var/log/file.log # log to a file with RFC3339 timestamps
.RE
.SS Named pipes
@@ -95,9 +192,14 @@ the mkfifo(1) command before rsyslogd(8) is started.
If the file you specified is a tty, special tty-handling is done, same with /dev/console.
.SS Remote machine
-To forward messages to another host, prepend the hostname with the at sign ("@"). A single at
-sign means that messages will be forwarded via UDP protocol (the standard for syslog). If you
-prepend two at signs ("@@"), the messages will be transmitted via TCP.
+There are three ways to forward message: the traditional UDP transport, which is extremely
+lossy but standard, the plain TCP based transport which loses messages only during certain
+situations but is widely available and the RELP transport which does not lose messages
+but is currently available only as part of rsyslogd 3.15.0 and above.
+
+To forward messages to another host via UDP, prepend the hostname with the at sign ("@").
+To forward it via plain tcp, prepend two at signs ("@@"). To forward via RELP, prepend the
+string ":omrelp:" in front of the hostname.
.B Example:
.RS
@@ -105,7 +207,18 @@ prepend two at signs ("@@"), the messages will be transmitted via TCP.
.RE
.sp
In the example above, messages are forwarded via UDP to the machine 192.168.0.1, the destination
-port defaults to 514.
+port defaults to 514. Due to the nature of UDP, you will probably lose some messages in transit.
+If you expect high traffic volume, you can expect to lose a quite noticable number of messages
+(the higher the traffic, the more likely and severe is message loss).
+
+.B If you would like to prevent message loss, use RELP:
+.RS
+*.* :omrelp:192.168.0.1:2514
+.RE
+.sp
+Note that a port number was given as there is no standard port for relp.
+
+Keep in mind that you need to load the correct input and output plugins (see "Modules" above).
Please note that rsyslogd offers a variety of options in regarding to remote
forwarding. For full details, please see the html documentation.
@@ -610,7 +723,6 @@ the html documentation for all features and details. This is especially vital if
up a more-then-extremely-simple system.
.SH AUTHORS
-The
.B rsyslogd
is taken from sysklogd sources, which have been heavily modified
by Rainer Gerhards (rgerhards@adiscon.com) and others.
diff --git a/rsyslogd.8 b/rsyslogd.8
index 353fb4c0..0125d589 100644
--- a/rsyslogd.8
+++ b/rsyslogd.8
@@ -1,7 +1,7 @@
.\" Copyright 2004-2008 Rainer Gerhards and Adiscon for the rsyslog modifications
.\" May be distributed under the GNU General Public License
.\"
-.TH RSYSLOGD 8 "28 March 2008" "Version 3.12.5 (devel)" "Linux System Administration"
+.TH RSYSLOGD 8 "02 April 2008" "Version 3.14.0" "Linux System Administration"
.SH NAME
rsyslogd \- reliable and extended syslogd
.SH SYNOPSIS
@@ -45,6 +45,8 @@ To use rsyslog's advanced features, you
.B need
to look at the html documentation, because the man pages only cover
basic aspects of operation.
+.B For details and configuration examples, see the rsyslog.conf (5)
+.B man page and the online documentation at http://www.rsyslog.com/doc
.BR Rsyslogd (8)
is derived from the sysklogd package which in turn is derived from the
@@ -83,11 +85,11 @@ option, is read at startup. Any lines that begin with the hash mark
(``#'') and empty lines are ignored. If an error occurs during parsing
the error element is ignored. It is tried to parse the rest of the line.
-For details and configuration examples, see the
-.B rsyslog.conf (5)
-man page.
.LP
.SH OPTIONS
+.B Note that in version 3 of rsyslog a number of command line options
+.B have been deprecated and replaced with config file directives. The
+.B -c option controls the backward compatibility mode in use.
.TP
.BI "\-A"
When sending UDP messages, there are potentially multiple pathes to
@@ -114,6 +116,28 @@ If neither -4 nor -6 is given,
.B rsyslogd
listens to all configured addresses of the system.
.TP
+.BI "\-c " "version"
+Selects the desired backward compatibility mode. It must always be the
+first option on the command line, as it influences processing of the
+other options. To use the rsyslog v3 native interface, specify -c3. To
+use compatibility mode , either do not use -c at all or use
+-c where
+.IR version
+is the rsyslog version that it shall be
+compatible with. Using -c0 tells rsyslog to be command-line compatible
+to sysklogd, which is the default if -c is not given.
+.B Please note that rsyslogd issues warning messages if the -c3
+.B command line option is not given.
+This is to alert you that your are running in compatibility
+mode. Compatibility mode interfers with you rsyslog.conf commands and
+may cause some undesired side-effects. It is meant to be used with a
+plain old rsyslog.conf - if you use new features, things become
+messy. So the best advice is to work through this document, convert
+your options and config file and then use rsyslog in native mode. In
+order to aid you in this process, rsyslog logs every
+compatibility-mode config file directive it has generated. So you can
+simply copy them from your logfile and paste them to the config.
+.TP
.B "\-d"
Turns on debug mode. Using this the daemon will not proceed a
.BR fork (2)
@@ -214,51 +238,6 @@ debug option.
.B CHLD
Wait for childs if some were born, because of wall'ing messages.
.LP
-.SH SUPPORT FOR REMOTE LOGGING
-.B Rsyslogd
-provides network support to the syslogd facility.
-Network support means that messages can be forwarded from one node
-running rsyslogd to another node running rsyslogd (or a
-compatible syslog implementation).
-actually logged to a disk file.
-
-To enable this, proper configuration commands must
-be entered in rsyslog.conf. See the rsyslog.conf html
-documentation for details.
-
-The strategy is to have rsyslogd listen on a unix domain socket for
-locally generated log messages. This behavior will allow rsyslogd to
-inter-operate with the syslog found in the standard C library. At the
-same time rsyslogd listens on the standard syslog port for messages
-forwarded from other hosts.
-
-.SH OUTPUT TO DATABASES
-.B Rsyslogd
-has support for writing data to database tables. The exact specifics
-are described in the
-.B rsyslog.conf (5)
-html documentation. Be sure to read it if you plan to use database logging.
-
-.SH OUTPUT TO NAMED PIPES (FIFOs)
-.B Rsyslogd
-has support for logging output to named pipes
-(fifos). A fifo or named pipe can be used as a destination for log
-messages by prepending a pipy symbol (``|'') to the name of the
-file. This is handy for debugging. Note that the fifo must be created
-with the mkfifo command before
-.B rsyslogd
-is started.
-.IP
-The following configuration file routes debug messages from the
-kernel to a fifo:
-.IP
-.nf
- # Sample configuration to route kernel debugging
- # messages ONLY to /usr/adm/debug which is a
- # named pipe.
- kern.=debug |/usr/adm/debug
-.fi
-.LP
.SH SECURITY THREATS
There is the potential for the rsyslogd daemon to be
used as a conduit for a denial of service attack.
@@ -314,6 +293,54 @@ The Unix domain socket to from where local syslog messages are read.
.I /var/run/rsyslogd.pid
The file containing the process id of
.BR rsyslogd .
+.TP
+.I prefix/lib/rsyslog
+Default directory for
+.B rsyslogd
+modules. The
+.I prefix
+is specified during compilation (e.g. /usr/local).
+.SH ENVIRONMENT
+.TP
+.B RSYSLOG_DEBUG
+Controls runtime debug support.It contains an option string with the
+following options possible (all are case insensitive):
+
+.RS
+.IP LogFuncFlow
+Print out the logical flow of functions (entering and exiting them)
+.IP FileTrace
+Ppecifies which files to trace LogFuncFlow. If not set (the
+default), a LogFuncFlow trace is provided for all files. Set to
+limit it to the files specified.FileTrace may be specified multiple
+times, one file each (e.g. export RSYSLOG_DEBUG="LogFuncFlow
+FileTrace=vm.c FileTrace=expr.c"
+.IP PrintFuncDB
+Print the content of the debug function database whenever debug
+information is printed (e.g. abort case)!
+.IP PrintAllDebugInfoOnExit
+Print all debug information immediately before rsyslogd exits
+(currently not implemented!)
+.IP PrintMutexAction
+Print mutex action as it happens. Useful for finding deadlocks and
+such.
+.IP NoLogTimeStamp
+Do not prefix log lines with a timestamp (default is to do that).
+.IP NoStdOut
+Do not emit debug messages to stdout. If RSYSLOG_DEBUGLOG is not
+set, this means no messages will be displayed at all.
+.IP Help
+Display a very short list of commands - hopefully a life saver if
+you can't access the documentation...
+.RE
+
+.TP
+.B RSYSLOG_DEBUGLOG
+If set, writes (allmost) all debug message to the specified log file
+in addition to stdout.
+.TP
+.B RSYSLOG_MODDIR
+Provides the default directory in which loadable modules reside.
.PD
.SH BUGS
Please review the file BUGS for up-to-date information on known
--
cgit v1.2.3
From 798acf51b482387a2702bd4064d538d7b3bedaa3 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 06:57:54 +0000
Subject: removed the 32 character size limit (from RFC3164) on the tag. This
had bad effects on existing envrionments, as sysklogd didn't obey it
either (probably another bug in RFC3164...). We now receive the full
size, but will modify the outputs so that only 32 characters max are used
by default. If you need large tags in the output, you need to provide
custom templates.
---
ChangeLog | 6 ++++++
syslogd.c | 22 +++++++++-------------
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 40774e36..5926cc3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,12 @@ Version 3.15.1 (rgerhards), 2008-04-??
happens during startup)
- bugfix: memory leaks in script engine
- bugfix: $hostname and $fromhost in RainerScript did not work
+- We have removed the 32 character size limit (from RFC3164) on the
+ tag. This had bad effects on existing envrionments, as sysklogd didn't
+ obey it either (probably another bug in RFC3164...). We now receive
+ the full size, but will modify the outputs so that only 32 characters
+ max are used by default. If you need large tags in the output, you need
+ to provide custom templates.
- bugfix: some memory leak when queue is runing in disk mode
---------------------------------------------------------------------------
Version 3.15.0 (rgerhards), 2008-04-01
diff --git a/syslogd.c b/syslogd.c
index b5554e5f..99020a5f 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -422,8 +422,8 @@ static uchar template_SyslogProtocol23Format[] = "\"<%PRI%>1 %TIMESTAMP:::date-r
static uchar template_TraditionalFileFormat[] = "\"%TIMESTAMP% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n\"";
static uchar template_FileFormat[] = "\"%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n\"";
static uchar template_WallFmt[] = "\"\r\n\7Message from syslogd@%HOSTNAME% at %timegenerated% ...\r\n %syslogtag%%msg%\n\r\"";
-static uchar template_ForwardFormat[] = "\"<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag%%msg%\"";
-static uchar template_TraditionalForwardFormat[] = "\"<%PRI%>%TIMESTAMP% %HOSTNAME% %syslogtag%%msg%\"";
+static uchar template_ForwardFormat[] = "\"<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag:1:32%%msg%\"";
+static uchar template_TraditionalForwardFormat[] = "\"<%PRI%>%TIMESTAMP% %HOSTNAME% %syslogtag:1:32%%msg%\"";
static uchar template_StdUsrMsgFmt[] = "\" %syslogtag%%msg%\n\r\"";
static uchar template_StdDBFmt[] = "\"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-mysql%', '%timegenerated:::date-mysql%', %iut%, '%syslogtag%')\",SQL";
static uchar template_StdPgSQLFmt[] = "\"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-pgsql%', '%timegenerated:::date-pgsql%', %iut%, '%syslogtag%')\",STDSQL";
@@ -1408,7 +1408,6 @@ static int parseLegacySyslogMsg(msg_t *pMsg, int flags)
* machine that we received the message from and the tag will be empty. This
* is meant to be an interim solution, but for now it is in the code.
*/
-
if(bParseHOSTNAMEandTAG && !(flags & INTERNAL_MSG)) {
/* parse HOSTNAME - but only if this is network-received!
* rger, 2005-11-14: we still have a problem with BSD messages. These messages
@@ -1466,16 +1465,18 @@ static int parseLegacySyslogMsg(msg_t *pMsg, int flags)
MsgSetHOSTNAME(pMsg, getRcvFrom(pMsg));
}
- /* now parse TAG - that should be present in message from
- * all sources.
+ /* now parse TAG - that should be present in message from all sources.
* This code is somewhat not compliant with RFC 3164. As of 3164,
* the TAG field is ended by any non-alphanumeric character. In
* practice, however, the TAG often contains dashes and other things,
* which would end the TAG. So it is not desirable. As such, we only
* accept colon and SP to be terminators. Even there is a slight difference:
* a colon is PART of the TAG, while a SP is NOT part of the tag
- * (it is CONTENT). Finally, we allow only up to 32 characters for
- * TAG, as it is specified in RFC 3164.
+ * (it is CONTENT). Starting 2008-04-04, we have removed the 32 character
+ * size limit (from RFC3164) on the tag. This had bad effects on existing
+ * envrionments, as sysklogd didn't obey it either (probably another bug
+ * in RFC3164...). We now receive the full size, but will modify the
+ * outputs so that only 32 characters max are used by default.
*/
/* The following code in general is quick & dirty - I need to get
* it going for a test, rgerhards 2004-11-16 */
@@ -1489,15 +1490,10 @@ static int parseLegacySyslogMsg(msg_t *pMsg, int flags)
rsCStrSetAllocIncrement(pStrB, 33);
pWork = pBuf;
iCnt = 0;
- while(*p2parse && *p2parse != ':' && *p2parse != ' ' && iCnt < 32) {
+ while(*p2parse && *p2parse != ':' && *p2parse != ' ') {
rsCStrAppendChar(pStrB, *p2parse++);
++iCnt;
}
- if (iCnt == 32) {
- while(*p2parse && *p2parse != ':' && *p2parse != ' ') {
- ++p2parse;
- }
- }
if(*p2parse == ':') {
++p2parse;
rsCStrAppendChar(pStrB, ':');
--
cgit v1.2.3
From c3d20d39fdca2e5fd9c08f13ef5ab15c4e9ad6ae Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 09:46:54 +0000
Subject: removed the 32 character size limit (from RFC3164) on the tag. This
had bad effects on existing envrionments, as sysklogd didn't obey it
either (probably another bug in RFC3164...). We now receive the full
size, but will modify the outputs so that only 32 characters max are used
by default. If you need large tags in the output, you need to provide
custom templates.
---
ChangeLog | 8 +++++++-
syslogd.c | 22 +++++++++-------------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dc333afe..92585e19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
---------------------------------------------------------------------------
-Version 3.14.0 (rgerhards), 2008-04-02
+Version 3.14.0 (rgerhards), 2008-04-04
- bugfix: rsyslogd was no longer build by default; man pages are
only installed if corresponding option is selected. Thanks to
Michael Biebl for pointing these problems out.
@@ -9,6 +9,12 @@ Version 3.14.0 (rgerhards), 2008-04-02
- bugfix: $hostname and $fromhost in RainerScript did not work
- bugfix: some memory leak when queue is runing in disk mode
- man pages improved thanks to varmofekoj and Peter Vrabec
+- We have removed the 32 character size limit (from RFC3164) on the
+ tag. This had bad effects on existing envrionments, as sysklogd didn't
+ obey it either (probably another bug in RFC3164...). We now receive
+ the full size, but will modify the outputs so that only 32 characters
+ max are used by default. If you need large tags in the output, you need
+ to provide custom templates.
---------------------------------------------------------------------------
Version 3.13.0-dev0 (rgerhards), 2008-03-31
- bugfix: accidently set debug option in 3.12.5 reset to production
diff --git a/syslogd.c b/syslogd.c
index 4bed94c8..99e0efcc 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -422,8 +422,8 @@ static uchar template_SyslogProtocol23Format[] = "\"<%PRI%>1 %TIMESTAMP:::date-r
static uchar template_TraditionalFileFormat[] = "\"%TIMESTAMP% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n\"";
static uchar template_FileFormat[] = "\"%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n\"";
static uchar template_WallFmt[] = "\"\r\n\7Message from syslogd@%HOSTNAME% at %timegenerated% ...\r\n %syslogtag%%msg%\n\r\"";
-static uchar template_ForwardFormat[] = "\"<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag%%msg%\"";
-static uchar template_TraditionalForwardFormat[] = "\"<%PRI%>%TIMESTAMP% %HOSTNAME% %syslogtag%%msg%\"";
+static uchar template_ForwardFormat[] = "\"<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag:1:32%%msg%\"";
+static uchar template_TraditionalForwardFormat[] = "\"<%PRI%>%TIMESTAMP% %HOSTNAME% %syslogtag:1:32%%msg%\"";
static uchar template_StdUsrMsgFmt[] = "\" %syslogtag%%msg%\n\r\"";
static uchar template_StdDBFmt[] = "\"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-mysql%', '%timegenerated:::date-mysql%', %iut%, '%syslogtag%')\",SQL";
static uchar template_StdPgSQLFmt[] = "\"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-pgsql%', '%timegenerated:::date-pgsql%', %iut%, '%syslogtag%')\",STDSQL";
@@ -1408,7 +1408,6 @@ static int parseLegacySyslogMsg(msg_t *pMsg, int flags)
* machine that we received the message from and the tag will be empty. This
* is meant to be an interim solution, but for now it is in the code.
*/
-
if(bParseHOSTNAMEandTAG && !(flags & INTERNAL_MSG)) {
/* parse HOSTNAME - but only if this is network-received!
* rger, 2005-11-14: we still have a problem with BSD messages. These messages
@@ -1466,16 +1465,18 @@ static int parseLegacySyslogMsg(msg_t *pMsg, int flags)
MsgSetHOSTNAME(pMsg, getRcvFrom(pMsg));
}
- /* now parse TAG - that should be present in message from
- * all sources.
+ /* now parse TAG - that should be present in message from all sources.
* This code is somewhat not compliant with RFC 3164. As of 3164,
* the TAG field is ended by any non-alphanumeric character. In
* practice, however, the TAG often contains dashes and other things,
* which would end the TAG. So it is not desirable. As such, we only
* accept colon and SP to be terminators. Even there is a slight difference:
* a colon is PART of the TAG, while a SP is NOT part of the tag
- * (it is CONTENT). Finally, we allow only up to 32 characters for
- * TAG, as it is specified in RFC 3164.
+ * (it is CONTENT). Starting 2008-04-04, we have removed the 32 character
+ * size limit (from RFC3164) on the tag. This had bad effects on existing
+ * envrionments, as sysklogd didn't obey it either (probably another bug
+ * in RFC3164...). We now receive the full size, but will modify the
+ * outputs so that only 32 characters max are used by default.
*/
/* The following code in general is quick & dirty - I need to get
* it going for a test, rgerhards 2004-11-16 */
@@ -1489,15 +1490,10 @@ static int parseLegacySyslogMsg(msg_t *pMsg, int flags)
rsCStrSetAllocIncrement(pStrB, 33);
pWork = pBuf;
iCnt = 0;
- while(*p2parse && *p2parse != ':' && *p2parse != ' ' && iCnt < 32) {
+ while(*p2parse && *p2parse != ':' && *p2parse != ' ') {
rsCStrAppendChar(pStrB, *p2parse++);
++iCnt;
}
- if (iCnt == 32) {
- while(*p2parse && *p2parse != ':' && *p2parse != ' ') {
- ++p2parse;
- }
- }
if(*p2parse == ':') {
++p2parse;
rsCStrAppendChar(pStrB, ':');
--
cgit v1.2.3
From 10da14f1a80b83feaf048c7bfa608f680a6b11d4 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 09:48:30 +0000
Subject: updating ... finally for release
---
doc/status.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/status.html b/doc/status.html
index bfced290..d7111a50 100644
--- a/doc/status.html
+++ b/doc/status.html
@@ -2,7 +2,7 @@
rsyslog status page
rsyslog status page
-This page reflects the status as of 2008-04-02.
+This page reflects the status as of 2008-04-04.
Current Releases
development: 3.15.0 -
@@ -30,7 +30,7 @@ help port rsyslog to other platforms. As such,
platform list is now maintained inside the rsyslog wiki.
Platform maintainers perhaps have posted extra information there. If
you do platform-specific work, feel free to add information to the wiki.
-Rsyslog is the default syslogd in Fedora 8.
+Rsyslog is the default syslogd in Fedora 8 and above.
Additional information
Currently supported features are listed on the rsyslog features page.
--
cgit v1.2.3
From cd9762ddae5e0350ede5431c88346690799a688e Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 12:04:54 +0000
Subject: bugfix: zero-length strings were not supported in object deserializer
---
ChangeLog | 2 ++
obj.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 92585e19..9320fcbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@ Version 3.14.0 (rgerhards), 2008-04-04
- bugfix: rsyslogd was no longer build by default; man pages are
only installed if corresponding option is selected. Thanks to
Michael Biebl for pointing these problems out.
+- bugfix: zero-length strings were not supported in object
+ deserializer
- disabled atomic operations for this stable build as it caused
platform problems
- bugfix: memory leaks in script engine
diff --git a/obj.c b/obj.c
index d408c4bb..2f16669a 100644
--- a/obj.c
+++ b/obj.c
@@ -495,7 +495,7 @@ finalize_it:
}
-/* de-serialize a string, length must be provided */
+/* de-serialize a string, length must be provided but may be 0 */
static rsRetVal objDeserializeStr(cstr_t **ppCStr, int iLen, strm_t *pStrm)
{
DEFiRet;
@@ -504,7 +504,7 @@ static rsRetVal objDeserializeStr(cstr_t **ppCStr, int iLen, strm_t *pStrm)
cstr_t *pCStr = NULL;
assert(ppCStr != NULL);
- assert(iLen > 0);
+ assert(iLen >= 0);
CHKiRet(rsCStrConstruct(&pCStr));
--
cgit v1.2.3
From 91e02eb209a6571429a00fa71854709dfc18ac99 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 12:05:28 +0000
Subject: bugfix: zero-length strings were not supported in object deserializer
---
ChangeLog | 2 ++
obj.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5926cc3f..7b18ef73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@ Version 3.15.1 (rgerhards), 2008-04-??
- disabled atomic operations for the time being because they introduce some
cross-platform trouble - need to see how to fix this in the best
possible way
+- bugfix: zero-length strings were not supported in object
+ deserializer
- added librelp check via PKG_CHECK thanks to Michael Biebl's patch
- file relputil.c deleted, is not actually needed
- added more meaningful error messages to rsyslogd (when some errors
diff --git a/obj.c b/obj.c
index d408c4bb..2f16669a 100644
--- a/obj.c
+++ b/obj.c
@@ -495,7 +495,7 @@ finalize_it:
}
-/* de-serialize a string, length must be provided */
+/* de-serialize a string, length must be provided but may be 0 */
static rsRetVal objDeserializeStr(cstr_t **ppCStr, int iLen, strm_t *pStrm)
{
DEFiRet;
@@ -504,7 +504,7 @@ static rsRetVal objDeserializeStr(cstr_t **ppCStr, int iLen, strm_t *pStrm)
cstr_t *pCStr = NULL;
assert(ppCStr != NULL);
- assert(iLen > 0);
+ assert(iLen >= 0);
CHKiRet(rsCStrConstruct(&pCStr));
--
cgit v1.2.3
From eb5339d4ab214e1b01a81d9f26e595148f60d939 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 12:19:24 +0000
Subject: bugfix: some messages were emited without hostname
---
ChangeLog | 1 +
syslogd.c | 81 +++++++++++++++++++++++++++++++--------------------------------
2 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9320fcbf..ac32eabe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
---------------------------------------------------------------------------
Version 3.14.0 (rgerhards), 2008-04-04
+- bugfix: some messages were emited without hostname
- bugfix: rsyslogd was no longer build by default; man pages are
only installed if corresponding option is selected. Thanks to
Michael Biebl for pointing these problems out.
diff --git a/syslogd.c b/syslogd.c
index 99e0efcc..355689c0 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2962,6 +2962,46 @@ int realMain(int argc, char **argv)
int bImUxSockLoaded = 0; /* already generated a $ModLoad imuxsock? */
uchar legacyConfLine[80];
+ gethostname(LocalHostName, sizeof(LocalHostName));
+ if ( (p = strchr(LocalHostName, '.')) ) {
+ *p++ = '\0';
+ LocalDomain = p;
+ }
+ else
+ {
+ LocalDomain = "";
+
+ /* It's not clearly defined whether gethostname()
+ * should return the simple hostname or the fqdn. A
+ * good piece of software should be aware of both and
+ * we want to distribute good software. Joey
+ *
+ * Good software also always checks its return values...
+ * If syslogd starts up before DNS is up & /etc/hosts
+ * doesn't have LocalHostName listed, gethostbyname will
+ * return NULL.
+ */
+ /* TODO: gethostbyname() is not thread-safe, but replacing it is
+ * not urgent as we do not run on multiple threads here. rgerhards, 2007-09-25
+ */
+ hent = gethostbyname(LocalHostName);
+ if(hent) {
+ snprintf(LocalHostName, sizeof(LocalHostName), "%s", hent->h_name);
+
+ if ( (p = strchr(LocalHostName, '.')) )
+ {
+ *p++ = '\0';
+ LocalDomain = p;
+ }
+ }
+ }
+
+ /* Convert to lower case to recognize the correct domain laterly
+ */
+ for (p = (char *)LocalDomain; *p ; p++)
+ if (isupper((int) *p))
+ *p = (char)tolower((int)*p);
+
CHKiRet(InitGlobalClasses());
/* doing some core initializations */
@@ -3232,47 +3272,6 @@ int realMain(int argc, char **argv)
}
myPid = getpid(); /* save our pid for further testing (also used for messages) */
-
- gethostname(LocalHostName, sizeof(LocalHostName));
- if ( (p = strchr(LocalHostName, '.')) ) {
- *p++ = '\0';
- LocalDomain = p;
- }
- else
- {
- LocalDomain = "";
-
- /* It's not clearly defined whether gethostname()
- * should return the simple hostname or the fqdn. A
- * good piece of software should be aware of both and
- * we want to distribute good software. Joey
- *
- * Good software also always checks its return values...
- * If syslogd starts up before DNS is up & /etc/hosts
- * doesn't have LocalHostName listed, gethostbyname will
- * return NULL.
- */
- /* TODO: gethostbyname() is not thread-safe, but replacing it is
- * not urgent as we do not run on multiple threads here. rgerhards, 2007-09-25
- */
- hent = gethostbyname(LocalHostName);
- if(hent) {
- snprintf(LocalHostName, sizeof(LocalHostName), "%s", hent->h_name);
-
- if ( (p = strchr(LocalHostName, '.')) )
- {
- *p++ = '\0';
- LocalDomain = p;
- }
- }
- }
-
- /* Convert to lower case to recognize the correct domain laterly
- */
- for (p = (char *)LocalDomain; *p ; p++)
- if (isupper((int) *p))
- *p = (char)tolower((int)*p);
-
memset(&sigAct, 0, sizeof (sigAct));
sigemptyset(&sigAct.sa_mask);
--
cgit v1.2.3
From bd5433196fb49972977b981baa25194e609e160d Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 12:26:19 +0000
Subject: bugfix: some messages were emited without hostname
---
ChangeLog | 1 +
queue.c | 2 --
syslogd.c | 81 +++++++++++++++++++++++++++++++--------------------------------
3 files changed, 41 insertions(+), 43 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7b18ef73..187a0538 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
---------------------------------------------------------------------------
Version 3.15.1 (rgerhards), 2008-04-??
+- bugfix: some messages were emited without hostname
- disabled atomic operations for the time being because they introduce some
cross-platform trouble - need to see how to fix this in the best
possible way
diff --git a/queue.c b/queue.c
index 7ae5815d..ed720c55 100644
--- a/queue.c
+++ b/queue.c
@@ -2208,8 +2208,6 @@ rsRetVal queueQueryInterface(void) { return RS_RET_NOT_IMPLEMENTED; }
*/
BEGINObjClassInit(queue, 1, OBJ_IS_CORE_MODULE)
/* request objects we use */
-DEFpropSetMeth(queue, iDeqtWinFromHr, int);
-DEFpropSetMeth(queue, iDeqtWinToHr, int);
/* now set our own handlers */
OBJSetMethodHandler(objMethod_SETPROPERTY, queueSetProperty);
diff --git a/syslogd.c b/syslogd.c
index 99020a5f..1c6766dc 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2992,6 +2992,46 @@ int realMain(int argc, char **argv)
int bImUxSockLoaded = 0; /* already generated a $ModLoad imuxsock? */
uchar legacyConfLine[80];
+ gethostname(LocalHostName, sizeof(LocalHostName));
+ if ( (p = strchr(LocalHostName, '.')) ) {
+ *p++ = '\0';
+ LocalDomain = p;
+ }
+ else
+ {
+ LocalDomain = "";
+
+ /* It's not clearly defined whether gethostname()
+ * should return the simple hostname or the fqdn. A
+ * good piece of software should be aware of both and
+ * we want to distribute good software. Joey
+ *
+ * Good software also always checks its return values...
+ * If syslogd starts up before DNS is up & /etc/hosts
+ * doesn't have LocalHostName listed, gethostbyname will
+ * return NULL.
+ */
+ /* TODO: gethostbyname() is not thread-safe, but replacing it is
+ * not urgent as we do not run on multiple threads here. rgerhards, 2007-09-25
+ */
+ hent = gethostbyname(LocalHostName);
+ if(hent) {
+ snprintf(LocalHostName, sizeof(LocalHostName), "%s", hent->h_name);
+
+ if ( (p = strchr(LocalHostName, '.')) )
+ {
+ *p++ = '\0';
+ LocalDomain = p;
+ }
+ }
+ }
+
+ /* Convert to lower case to recognize the correct domain laterly
+ */
+ for (p = (char *)LocalDomain; *p ; p++)
+ if (isupper((int) *p))
+ *p = (char)tolower((int)*p);
+
CHKiRet_Hdlr(InitGlobalClasses()) {
fprintf(stderr, "rsyslogd initializiation failed - global classes could not be initialized.\n"
@@ -3269,47 +3309,6 @@ int realMain(int argc, char **argv)
}
myPid = getpid(); /* save our pid for further testing (also used for messages) */
-
- gethostname(LocalHostName, sizeof(LocalHostName));
- if ( (p = strchr(LocalHostName, '.')) ) {
- *p++ = '\0';
- LocalDomain = p;
- }
- else
- {
- LocalDomain = "";
-
- /* It's not clearly defined whether gethostname()
- * should return the simple hostname or the fqdn. A
- * good piece of software should be aware of both and
- * we want to distribute good software. Joey
- *
- * Good software also always checks its return values...
- * If syslogd starts up before DNS is up & /etc/hosts
- * doesn't have LocalHostName listed, gethostbyname will
- * return NULL.
- */
- /* TODO: gethostbyname() is not thread-safe, but replacing it is
- * not urgent as we do not run on multiple threads here. rgerhards, 2007-09-25
- */
- hent = gethostbyname(LocalHostName);
- if(hent) {
- snprintf(LocalHostName, sizeof(LocalHostName), "%s", hent->h_name);
-
- if ( (p = strchr(LocalHostName, '.')) )
- {
- *p++ = '\0';
- LocalDomain = p;
- }
- }
- }
-
- /* Convert to lower case to recognize the correct domain laterly
- */
- for (p = (char *)LocalDomain; *p ; p++)
- if (isupper((int) *p))
- *p = (char)tolower((int)*p);
-
memset(&sigAct, 0, sizeof (sigAct));
sigemptyset(&sigAct.sa_mask);
--
cgit v1.2.3
From c7173e592773e73ebf3e005402ffdb347b555d5f Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 15:30:53 +0000
Subject: preparing for 3.14.1 release
---
ChangeLog | 7 ++++++-
configure.ac | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ac32eabe..09fca562 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
---------------------------------------------------------------------------
-Version 3.14.0 (rgerhards), 2008-04-04
+Version 3.14.1 (rgerhards), 2008-04-04
- bugfix: some messages were emited without hostname
- bugfix: rsyslogd was no longer build by default; man pages are
only installed if corresponding option is selected. Thanks to
@@ -19,6 +19,11 @@ Version 3.14.0 (rgerhards), 2008-04-04
max are used by default. If you need large tags in the output, you need
to provide custom templates.
---------------------------------------------------------------------------
+Version 3.14.0 (rgerhards), 2008-04-02
+An interim version was accidently released to the web. It was named 3.14.0.
+To avoid confusion, we have not assigned this version number to any
+official release. If you happen to use 3.14.0, please update to 3.14.1.
+---------------------------------------------------------------------------
Version 3.13.0-dev0 (rgerhards), 2008-03-31
- bugfix: accidently set debug option in 3.12.5 reset to production
This option prevented dlclose() to be called. It had no real bad effects,
diff --git a/configure.ac b/configure.ac
index 7012018d..ae388a9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([rsyslog],[3.14.0],[rsyslog@lists.adiscon.com])
+AC_INIT([rsyslog],[3.14.1],[rsyslog@lists.adiscon.com])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([syslogd.c])
AC_CONFIG_HEADERS([config.h])
--
cgit v1.2.3
From 26000d7bf153606fcfe6f1665ff7b441348a20f1 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 17:04:54 +0000
Subject: bugfix: segfault with expression-based filters - so far untested
---
ChangeLog | 3 +++
syslogd.c | 7 ++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 09fca562..228f9230 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
---------------------------------------------------------------------------
+Version 3.14.2 (rgerhards), 2008-04-??
+- bugfix: segfault with expression-based filters
+---------------------------------------------------------------------------
Version 3.14.1 (rgerhards), 2008-04-04
- bugfix: some messages were emited without hostname
- bugfix: rsyslogd was no longer build by default; man pages are
diff --git a/syslogd.c b/syslogd.c
index 355689c0..f21fce7e 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -1053,10 +1053,11 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce
finalize_it:
/* destruct in any case, not just on error, but it makes error handling much easier */
- if(pVM != NULL) {
- var.Destruct(&pResult);
+ if(pVM != NULL)
vm.Destruct(&pVM);
- }
+
+ if(pResult != NULL)
+ var.Destruct(&pResult);
*bProcessMsg = bRet;
RETiRet;
--
cgit v1.2.3
From 0c2298f0a163b72abc8c34eecffc4f1ea693bbb5 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 17:05:25 +0000
Subject: bumped version number
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index ae388a9a..e2bda201 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([rsyslog],[3.14.1],[rsyslog@lists.adiscon.com])
+AC_INIT([rsyslog],[3.14.2],[rsyslog@lists.adiscon.com])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([syslogd.c])
AC_CONFIG_HEADERS([config.h])
--
cgit v1.2.3
From c34ef852ee583de6e335f02d78f917b7d4da8062 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Apr 2008 17:07:44 +0000
Subject: bugfix: segfault with expression-based filters - so far untested
---
syslogd.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/syslogd.c b/syslogd.c
index 1c6766dc..9d4c778e 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -1053,10 +1053,11 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce
finalize_it:
/* destruct in any case, not just on error, but it makes error handling much easier */
- if(pVM != NULL) {
- var.Destruct(&pResult);
+ if(pVM != NULL)
vm.Destruct(&pVM);
- }
+
+ if(pResult != NULL)
+ var.Destruct(&pResult);
*bProcessMsg = bRet;
RETiRet;
--
cgit v1.2.3
From 65f24e82a0a6777136fe894cd236b41e05e72765 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Mon, 7 Apr 2008 11:23:06 +0200
Subject: fixed file permissions
---
liblogging-stub.h | 0
srUtils.c | 0
srUtils.h | 0
stringbuf.c | 0
stringbuf.h | 0
5 files changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 liblogging-stub.h
mode change 100755 => 100644 srUtils.c
mode change 100755 => 100644 srUtils.h
mode change 100755 => 100644 stringbuf.c
mode change 100755 => 100644 stringbuf.h
diff --git a/liblogging-stub.h b/liblogging-stub.h
old mode 100755
new mode 100644
diff --git a/srUtils.c b/srUtils.c
old mode 100755
new mode 100644
diff --git a/srUtils.h b/srUtils.h
old mode 100755
new mode 100644
diff --git a/stringbuf.c b/stringbuf.c
old mode 100755
new mode 100644
diff --git a/stringbuf.h b/stringbuf.h
old mode 100755
new mode 100644
--
cgit v1.2.3
From 833f4642621699890d05c041d3ace5de24f369ba Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Mon, 7 Apr 2008 12:14:49 +0200
Subject: fixed segfault when using expression based-filters
This was introduced by an invalid CVS patch.
---
syslogd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/syslogd.c b/syslogd.c
index f21fce7e..97d700f6 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -1056,6 +1056,7 @@ finalize_it:
if(pVM != NULL)
vm.Destruct(&pVM);
+RUNLOG_VAR("%p", var);
if(pResult != NULL)
var.Destruct(&pResult);
@@ -2838,12 +2839,11 @@ InitGlobalClasses(void)
/* the following classes were intialized by objClassInit() */
CHKiRet(objUse(errmsg, CORE_COMPONENT));
CHKiRet(objUse(module, CORE_COMPONENT));
+ CHKiRet(objUse(var, CORE_COMPONENT));
/* initialize and use classes. We must be very careful with the order of events. Some
* classes use others and if we do not initialize them in the right order, we may end
* up with an invalid call. The most important thing that can happen is that an error
- pErrObj = "var";
- CHKiRet(objUse(var, CORE_COMPONENT));
* is detected and needs to be logged, wich in turn requires a broader number of classes
* to be available. The solution is that we take care in the order of calls AND use a
* class immediately after it is initialized. And, of course, we load those classes
--
cgit v1.2.3
From 2f282692b572f25395aef6cfb6d656105c564a5e Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Mon, 7 Apr 2008 12:36:18 +0200
Subject: cleanup; var object was not dereferenced on termination
---
syslogd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/syslogd.c b/syslogd.c
index 97d700f6..4d9f8257 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -1056,7 +1056,6 @@ finalize_it:
if(pVM != NULL)
vm.Destruct(&pVM);
-RUNLOG_VAR("%p", var);
if(pResult != NULL)
var.Destruct(&pResult);
@@ -2900,6 +2899,7 @@ GlobalClassExit(void)
objRelease(conf, CORE_COMPONENT);
objRelease(expr, CORE_COMPONENT);
objRelease(vm, CORE_COMPONENT);
+ objRelease(var, CORE_COMPONENT);
objRelease(datetime, CORE_COMPONENT);
/* TODO: implement the rest of the deinit */
@@ -2925,10 +2925,7 @@ GlobalClassExit(void)
CHKiRet(templateInit());
#endif
/* dummy "classes */
-dbgprintf("pre strExit()\n");
strExit();
-dbgprintf("post strExit()\n");
-
#if 0
CHKiRet(objGetObjInterface(&obj)); /* this provides the root pointer for all other queries */
--
cgit v1.2.3
From 2f8fb81bd4cfcc69049b767139389af023d1eef6 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Mon, 7 Apr 2008 12:37:32 +0200
Subject: cleanup
---
ChangeLog | 1 +
1 file changed, 1 insertion(+)
diff --git a/ChangeLog b/ChangeLog
index 228f9230..8ea0dbed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
---------------------------------------------------------------------------
Version 3.14.2 (rgerhards), 2008-04-??
- bugfix: segfault with expression-based filters
+- some cleanup
---------------------------------------------------------------------------
Version 3.14.1 (rgerhards), 2008-04-04
- bugfix: some messages were emited without hostname
--
cgit v1.2.3
From ade79c4df054e56905694013f2e60ad0bb3c8647 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Mon, 7 Apr 2008 12:59:28 +0200
Subject: some cleanup of debug messages
---
expr.c | 3 ---
vm.c | 7 -------
2 files changed, 10 deletions(-)
diff --git a/expr.c b/expr.c
index e6f4ef23..5c11b756 100644
--- a/expr.c
+++ b/expr.c
@@ -371,7 +371,6 @@ exprParse(expr_t *pThis, ctok_t *tok)
/* happy parsing... */
CHKiRet(expr(pThis, tok));
dbgoprint((obj_t*) pThis, "successfully parsed/created expression\n");
-vmprg.DebugPrint(pThis->pVmprg);
finalize_it:
RETiRet;
@@ -392,8 +391,6 @@ CODESTARTobjQueryInterface(expr)
* work here (if we can support an older interface version - that,
* of course, also affects the "if" above).
*/
- //xxxpIf->oID = OBJexpr;
-
pIf->Construct = exprConstruct;
pIf->ConstructFinalize = exprConstructFinalize;
pIf->Destruct = exprDestruct;
diff --git a/vm.c b/vm.c
index a26e4331..b97898c5 100644
--- a/vm.c
+++ b/vm.c
@@ -193,8 +193,6 @@ CODESTARTop(CMP_CONTAINS)
/* operand2 is on top of stack, so needs to be popped first */
vmstk.PopString(pThis->pStk, &operand2);
vmstk.PopString(pThis->pStk, &operand1);
-var.DebugPrint(operand1); \
-var.DebugPrint(operand2); \
/* TODO: extend cstr class so that it supports location of cstr inside cstr */
bRes = (rsCStrLocateInSzStr(operand2->val.pStr, rsCStrGetSzStr(operand1->val.pStr)) == -1) ? 0 : 1;
@@ -233,8 +231,6 @@ CODESTARTop(CMP_STARTSWITH)
/* operand2 is on top of stack, so needs to be popped first */
vmstk.PopString(pThis->pStk, &operand2);
vmstk.PopString(pThis->pStk, &operand1);
-var.DebugPrint(operand1); \
-var.DebugPrint(operand2); \
/* TODO: extend cstr class so that it supports location of cstr inside cstr */
bRes = (rsCStrStartsWithSzStr(operand1->val.pStr, rsCStrGetSzStr(operand2->val.pStr),
rsCStrLen(operand2->val.pStr)) == 0) ? 1 : 0;
@@ -254,14 +250,11 @@ CODESTARTop(CMP_STARTSWITHI)
/* operand2 is on top of stack, so needs to be popped first */
vmstk.PopString(pThis->pStk, &operand2);
vmstk.PopString(pThis->pStk, &operand1);
-var.DebugPrint(operand1); \
-var.DebugPrint(operand2); \
/* TODO: extend cstr class so that it supports location of cstr inside cstr */
bRes = (rsCStrCaseInsensitveStartsWithSzStr(operand1->val.pStr, rsCStrGetSzStr(operand2->val.pStr),
rsCStrLen(operand2->val.pStr)) == 0) ? 1 : 0;
/* we have a result, so let's push it */
-RUNLOG_VAR("%lld", bRes); \
PUSHRESULTop(operand1, bRes);
var.Destruct(&operand2); /* no longer needed */
ENDop(CMP_STARTSWITHI)
--
cgit v1.2.3