From b45e56dabfb39ffd357c413ea9bb1a9d5b40683c Mon Sep 17 00:00:00 2001 From: Peter Vrabec Date: Tue, 11 Mar 2008 11:29:05 +0000 Subject: [PATCH] fix config file parsing --- rsyslog-3.12.1-omfile.patch | 33 +++++++++++++++++++++++++++++++++ rsyslog.spec | 3 +++ 2 files changed, 36 insertions(+) create mode 100644 rsyslog-3.12.1-omfile.patch diff --git a/rsyslog-3.12.1-omfile.patch b/rsyslog-3.12.1-omfile.patch new file mode 100644 index 0000000..31bc983 --- /dev/null +++ b/rsyslog-3.12.1-omfile.patch @@ -0,0 +1,33 @@ +diff -up rsyslog-3.12.1/omfile.c.orig rsyslog-3.12.1/omfile.c +--- rsyslog-3.12.1/omfile.c.orig 2008-03-11 11:20:02.000000000 +0100 ++++ rsyslog-3.12.1/omfile.c 2008-03-11 11:23:46.000000000 +0100 +@@ -356,7 +356,8 @@ static void dynaFileFreeCache(instanceDa + dynaFileDelCacheEntry(pData->dynCache, i, 1); + } + +- d_free(pData->dynCache); ++ if(pData->dynCache != NULL) ++ d_free(pData->dynCache); + ENDfunc; + } + +@@ -620,7 +621,7 @@ BEGINfreeInstance + CODESTARTfreeInstance + if(pData->bDynamicName) { + dynaFileFreeCache(pData); +- } else ++ } else if(pData->fd != -1) + close(pData->fd); + ENDfreeInstance + +diff -up rsyslog-3.12.1/conf.c.orig rsyslog-3.12.1/conf.c +--- rsyslog-3.12.1/conf.c.orig 2008-03-11 11:13:00.000000000 +0100 ++++ rsyslog-3.12.1/conf.c 2008-03-11 11:13:18.000000000 +0100 +@@ -1024,6 +1024,7 @@ static rsRetVal cflineDoAction(uchar **p + /* loop through all modules and see if one picks up the line */ + pMod = module.GetNxtType(NULL, eMOD_OUT); + while(pMod != NULL) { ++ pOMSR = NULL; + iRet = pMod->mod.om.parseSelectorAct(p, &pModData, &pOMSR); + dbgprintf("tried selector action for %s: %d\n", module.GetName(pMod), iRet); + if(iRet == RS_RET_OK || iRet == RS_RET_SUSPENDED) { diff --git a/rsyslog.spec b/rsyslog.spec index 0acc79d..fe35b0d 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -12,6 +12,7 @@ Source1: rsyslog.init Source2: rsyslog.conf Source3: rsyslog.sysconfig Patch1: rsyslog-3.11.4-undef.patch +Patch2: rsyslog-3.12.1-omfile.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 .omfile %build %configure --sbindir=%{sbindir} --disable-static --enable-mysql --enable-pgsql --enable-gssapi-krb5 @@ -152,6 +154,7 @@ fi %changelog * Tue Mar 11 2008 Peter Vrabec 3.12.1-2 - init script fixes (#436854) +- fix config file parsing (#436722) * Thu Mar 06 2008 Peter Vrabec 3.12.1-1 - upgrade