diff --git a/rsyslog-3.14.1-segfaultExprFilt.patch b/rsyslog-3.14.1-segfaultExprFilt.patch new file mode 100644 index 0000000..d050c6f --- /dev/null +++ b/rsyslog-3.14.1-segfaultExprFilt.patch @@ -0,0 +1,52 @@ +diff --git a/syslogd.c b/syslogd.c +index 355689c..4d9f825 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; +@@ -2837,12 +2838,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 +@@ -2899,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 */ +@@ -2924,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 */ diff --git a/rsyslog.spec b/rsyslog.spec index c03c466..8c045ef 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -3,7 +3,7 @@ Summary: Enhanced system logging and kernel message trapping daemons Name: rsyslog Version: 3.14.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -12,6 +12,7 @@ Source1: rsyslog.init Source2: rsyslog.conf Source3: rsyslog.sysconfig Patch1: rsyslog-3.11.4-undef.patch +Patch2: rsyslog-3.14.1-segfaultExprFilt.patch BuildRequires: zlib-devel BuildRequires: autoconf automake Requires: logrotate >= 3.5.2 @@ -67,6 +68,7 @@ authentication. %prep %setup -q %patch1 -p1 -b .undef +%patch2 -p1 -b .segfaultExprFilt %build %configure --sbindir=%{sbindir} \ @@ -158,6 +160,9 @@ fi %{_libdir}/rsyslog/omgssapi.so %changelog +* Tue Apr 08 2008 Peter Vrabec 3.14.1-3 +- fix segfault of expression based filters + * Mon Apr 07 2008 Peter Vrabec 3.14.1-2 - init script fixes (#441170,#440968)