fix config file parsing

This commit is contained in:
Peter Vrabec 2008-03-11 11:29:05 +00:00
parent e142b666eb
commit b45e56dabf
2 changed files with 36 additions and 0 deletions

View File

@ -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) {

View File

@ -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 <pvrabec@redhat.com> 3.12.1-2
- init script fixes (#436854)
- fix config file parsing (#436722)
* Thu Mar 06 2008 Peter Vrabec <pvrabec@redhat.com> 3.12.1-1
- upgrade