- upstream bugfix release

- support for negative app selector, patch from theinric@redhat.com
This commit is contained in:
Peter Vrabec 2007-08-28 12:39:16 +00:00
parent 9249024009
commit cf28de2812
8 changed files with 37 additions and 241 deletions

View File

@ -1,3 +1,3 @@
rsyslog-1.19.0.tar.gz
rsyslog.init
rsyslog.sysconfig
rsyslog-1.19.2.tar.gz

View File

@ -1,30 +0,0 @@
--- rsyslog-1.19.0/Makefile.am.libPath 2007-08-09 04:05:28.000000000 +0200
+++ rsyslog-1.19.0/Makefile.am 2007-08-21 12:20:46.000000000 +0200
@@ -1,7 +1,7 @@
sbin_PROGRAMS=rklogd rfc3195d rsyslogd
-rsyslogmoddir=/lib/rsyslog/
-rsyslogmod_LTLIBRARIES=ommysql.la
+
+pkglib_LTLIBRARIES = ommysql.la
rklogd_SOURCES=klogd.c syslog.c pidfile.c ksym.c ksym_mod.c klogd.h ksyms.h pidfile.h module.h
@@ -10,13 +10,14 @@
man_MANS = rfc3195d.8 rklogd.8 rsyslogd.8 rsyslog.conf.5
rsyslogd_SOURCES=syslogd.c pidfile.c template.c outchannel.c stringbuf.c srUtils.c parse.c syslogd-types.h template.h outchannel.h syslogd.h stringbuf.h parse.h srUtils.h liblogging-stub.h net.c net.h msg.c msg.h omshell.c omshell.h omusrmsg.c omusrmsg.h ommysql.h omfwd.c omfwd.h tcpsyslog.c tcpsyslog.h omfile.h omfile.c omdiscard.c omdiscard.h modules.c modules.h module-template.h objomsr.c objomsr.h cfsysline.c cfsysline.h linkedlist.c linkedlist.h iminternal.c iminternal.h action.c action.h
-rsyslogd_CPPFLAGS=-D_PATH_MODDIR=\"$(rsyslogmoddir)\"
+rsyslogd_CPPFLAGS=-D_PATH_MODDIR=\"$(pkglibdir)/\"
rsyslogd_LDADD=$(zlib_libs) $(pthreads_libs) -ldl
rsyslogd_LDFLAGS=-export-dynamic
ommysql_la_SOURCES=ommysql.c ommysql.h
ommysql_la_CPPFLAGS=$(mysql_includes)
-ommysql_la_LDFLAGS=-module -export-dynamic
+ommysql_la_LDFLAGS=-module -avoid-version
ommysql_la_LIBADD=$(mysql_libs)
-EXTRA_DIST = doc/bugs.html doc/features.html doc/generic_design.html doc/history.html doc/how2help.html doc/install.html doc/ipv6.html doc/manual.html doc/property_replacer.html doc/rsyslog_conf.html doc/rsyslog_mysql.html doc/rsyslog_packages.html doc/rsyslog_php_syslog_ng.html doc/rsyslog_recording_pri.html doc/rsyslog_stunnel.html doc/status.html doc/syslog-protocol.html doc/version_naming.html doc/contributors.html redhat/rsyslog.conf redhat/rsyslog.init redhat/rsyslog.log redhat/rsyslog.sysconfig freebsd/rsyslogd slackware/rc.rsyslogd rfc3195d.8 rklogd.8 rsyslogd.8 rsyslog.conf.5 createDB.sql contrib/README contrib/delete_mysql doc/rsconf1_actionexeconlyifpreviousissuspended.html doc/rsconf1_actionresumeinterval.html doc/rsconf1_allowedsender.html doc/rsconf1_controlcharacterescapeprefix.html doc/rsconf1_debugprintcfsyslinehandlerlist.html doc/rsconf1_debugprintmodulelist.html doc/rsconf1_debugprinttemplatelist.html doc/rsconf1_dircreatemode.html doc/rsconf1_dirgroup.html doc/rsconf1_dirowner.html doc/rsconf1_dropmsgswithmaliciousdnsptrrecords.html doc/rsconf1_droptrailinglfonreception.html doc/rsconf1_dynafilecachesize.html doc/rsconf1_escapecontrolcharactersonreceive.html doc/rsconf1_failonchownfailure.html doc/rsconf1_filecreatemode.html doc/rsconf1_filegroup.html doc/rsconf1_fileowner.html doc/rsconf1_includeconfig.html doc/rsconf1_mainmsgqueuesize.html doc/rsconf1_modload.html doc/rsconf1_repeatedmsgreduction.html doc/rsconf1_resetconfigvariables.html doc/rsconf1_umask.html
+EXTRA_DIST = doc/bugs.html doc/features.html doc/generic_design.html doc/history.html doc/how2help.html doc/install.html doc/ipv6.html doc/manual.html doc/property_replacer.html doc/rsyslog_conf.html doc/rsyslog_mysql.html doc/rsyslog_packages.html doc/rsyslog_php_syslog_ng.html doc/rsyslog_recording_pri.html doc/rsyslog_stunnel.html doc/status.html doc/syslog-protocol.html doc/version_naming.html doc/contributors.html redhat/rsyslog.conf redhat/rsyslog.init redhat/rsyslog.log redhat/rsyslog.sysconfig freebsd/rsyslogd slackware/rc.rsyslogd rfc3195d.8 rklogd.8 rsyslogd.8 rsyslog.conf.5 createDB.sql contrib/README contrib/delete_mysql doc/rsconf1_actionexeconlyifpreviousissuspended.html doc/rsconf1_actionresumeinterval.html doc/rsconf1_allowedsender.html doc/rsconf1_controlcharacterescapeprefix.html doc/rsconf1_debugprintcfsyslinehandlerlist.html doc/rsconf1_debugprintmodulelist.html doc/rsconf1_debugprinttemplatelist.html doc/rsconf1_dircreatemode.html doc/rsconf1_dirgroup.html doc/rsconf1_dirowner.html doc/rsconf1_dropmsgswithmaliciousdnsptrrecords.html doc/rsconf1_droptrailinglfonreception.html doc/rsconf1_dynafilecachesize.html doc/rsconf1_escapecontrolcharactersonreceive.html doc/rsconf1_failonchownfailure.html doc/rsconf1_filecreatemode.html doc/rsconf1_filegroup.html doc/rsconf1_fileowner.html doc/rsconf1_includeconfig.html doc/rsconf1_mainmsgqueuesize.html doc/rsconf1_modload.html doc/rsconf1_repeatedmsgreduction.html doc/rsconf1_resetconfigvariables.html doc/rsconf1_umask.html createDB.sql
+

View File

@ -1,101 +0,0 @@
--- rsyslog/cfsysline.c.orig 2007-08-16 23:33:00.000000000 +0200
+++ rsyslog/cfsysline.c 2007-08-16 23:44:10.000000000 +0200
@@ -573,6 +573,12 @@ finalize_it:
}
+rsRetVal unregCfSysLineHdlrs(void)
+{
+ return llDestroy(&llCmdList);
+}
+
+
/* process a cfsysline command (based on handler structure)
* param "p" is a pointer to the command line after the command. Should be
* updated.
--- rsyslog/cfsysline.h.orig 2007-08-16 23:33:10.000000000 +0200
+++ rsyslog/cfsysline.h 2007-08-16 23:44:23.000000000 +0200
@@ -61,6 +61,7 @@ typedef struct cslCmd_s cslCmd_t;
/* prototypes */
rsRetVal regCfSysLineHdlr(uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(), void *pData);
+rsRetVal unregCfSysLineHdlrs(void);
rsRetVal processCfSysLineCommand(uchar *pCmd, uchar **p);
rsRetVal cfsyslineInit(void);
void dbgPrintCfSysLineHandlers(void);
--- rsyslog/syslogd.c.orig 2007-08-16 23:45:27.000000000 +0200
+++ rsyslog/syslogd.c 2007-08-17 11:23:54.000000000 +0200
@@ -3552,7 +3552,7 @@ static void die(int sig)
/* de-init some modules */
modExitIminternal();
- /*TODO: the module config command handlers must also be freed! */
+ unregCfSysLineHdlrs();
/* TODO: this would also be the right place to de-init the builtin output modules. We
* do not currently do that, because the module interface does not allow for
@@ -4259,6 +4259,10 @@ static void init(void)
/* Close all open log files and free log descriptor array. */
freeSelectors();
+ /* Unload all non-static modules */
+ dbgprintf("Unloading non-static modules.\n");
+ modUnloadAndDestructDynamic();
+
dbgprintf("Clearing templates.\n");
tplDeleteNew();
--- rsyslog/ommysql.c.orig 2007-08-17 11:02:00.000000000 +0200
+++ rsyslog/ommysql.c 2007-08-17 11:02:02.000000000 +0200
@@ -79,6 +79,7 @@ static void closeMySQL(instanceData *pDa
assert(pData != NULL);
if(pData->f_hmysql != NULL) { /* just to be on the safe side... */
+ mysql_server_end();
mysql_close(pData->f_hmysql);
pData->f_hmysql = NULL;
}
--- rsyslog/modules.c.orig 2007-08-21 09:43:48.000000000 +0200
+++ rsyslog/modules.c 2007-08-21 09:07:17.000000000 +0200
@@ -336,6 +336,31 @@ rsRetVal modUnloadAndDestructAll(void)
return iRet;
}
+
+
+rsRetVal modUnloadAndDestructDynamic(void)
+{
+ DEFiRet;
+ modInfo_t *pMod;
+ modInfo_t *pModPrev;
+
+ pLoadedModulesLast = NULL;
+
+ pMod = modGetNxt(NULL);
+ while(pMod != NULL) {
+ pModPrev = pMod;
+ pMod = modGetNxt(pModPrev); /* get next */
+ /* now we can destroy the previous module */
+ if(pModPrev->eLinkType != eMOD_LINK_STATIC) {
+ dbgprintf("Unloading module %s\n", modGetName(pModPrev));
+ moduleDestruct(pModPrev);
+ } else {
+ pLoadedModulesLast = pModPrev;
+ }
+ }
+
+ return iRet;
+}
/*
* vi:set ai:
*/
--- rsyslog/modules.h.orig 2007-08-17 11:11:26.000000000 +0200
+++ rsyslog/modules.h 2007-08-17 11:15:35.000000000 +0200
@@ -94,6 +94,7 @@ uchar *modGetName(modInfo_t *pThis);
uchar *modGetStateName(modInfo_t *pThis);
void modPrintList(void);
rsRetVal modUnloadAndDestructAll(void);
+rsRetVal modUnloadAndDestructDynamic(void);
#endif /* #ifndef MODULES_H_INCLUDED */
/*

View File

@ -1,79 +0,0 @@
--- rsyslog/ommysql.c.orig 2007-08-16 17:06:10.000000000 +0200
+++ rsyslog/ommysql.c 2007-08-16 17:07:02.000000000 +0200
@@ -229,7 +229,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(
/* ok, if we reach this point, we have something for us */
if((iRet = createInstance(&pData)) != RS_RET_OK)
- return iRet;
+ goto finalize_it;
p++; /* eat '>' '*/
--- rsyslog/omusrmsg.c.orig 2007-08-16 17:07:20.000000000 +0200
+++ rsyslog/omusrmsg.c 2007-08-16 17:11:52.000000000 +0200
@@ -272,10 +272,10 @@ CODE_STD_STRING_REQUESTparseSelectorAct(
*/
if (!*p || !((*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z')
|| (*p >= '0' && *p <= '9') || *p == '_' || *p == '.' || *p == '*'))
- return RS_RET_CONFLINE_UNPROCESSED;
+ ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);
if((iRet = createInstance(&pData)) != RS_RET_OK)
- return iRet;
+ goto finalize_it;
if(*p == '*') { /* wall */
@@ -284,7 +284,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(
pData->bIsWall = 1; /* write to all users */
if((iRet = cflineParseTemplateName(&p, *ppOMSR, 0, OMSR_NO_RQD_TPL_OPTS, (uchar*) " WallFmt"))
!= RS_RET_OK)
- return iRet;
+ goto finalize_it;
} else {
/* everything else beginning with the regex above
* is currently treated as a user name
@@ -309,7 +309,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(
*/
if((iRet = cflineParseTemplateName(&p, *ppOMSR, 0, OMSR_NO_RQD_TPL_OPTS, (uchar*)" StdUsrMsgFmt"))
!= RS_RET_OK)
- return iRet;
+ goto finalize_it;
}
CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct
--- rsyslog/rsyslog.h.orig 2007-08-16 17:13:38.000000000 +0200
+++ rsyslog/rsyslog.h 2007-08-16 17:15:47.000000000 +0200
@@ -82,9 +82,11 @@ typedef enum rsRetVal_ rsRetVal; /**< fr
/* macro below is to be used if we need our own handling, eg for cleanup */
#define CHKiRet_Hdlr(code) if((iRet = code) != RS_RET_OK)
#define DEFiRet rsRetVal iRet = RS_RET_OK
-#define ABORT_FINALIZE(errCode) \
- iRet = errCode;\
- goto finalize_it;
+#define ABORT_FINALIZE(errCode) \
+ do { \
+ iRet = errCode; \
+ goto finalize_it; \
+ } while (0)
/** Object ID. These are for internal checking. Each
* object is assigned a specific ID. This is contained in
--- rsyslog/module-template.h.orig 2007-08-16 17:29:13.000000000 +0200
+++ rsyslog/module-template.h 2007-08-16 17:38:37.000000000 +0200
@@ -226,10 +226,13 @@ finalize_it:\
*pp = p;\
} else {\
/* cleanup, we failed */\
- if(*ppOMSR != NULL)\
+ if(*ppOMSR != NULL) {\
OMSRdestruct(*ppOMSR);\
*ppOMSR = NULL;\
- }
+ }\
+ if(pData != NULL)\
+ freeInstance(&pData);\
+ }
#define ENDparseSelectorAct \
return iRet;\

View File

@ -1,18 +0,0 @@
--- rsyslog-1.19.0/syslogd.c.orig 2007-08-21 16:45:10.000000000 +0200
+++ rsyslog-1.19.0/syslogd.c 2007-08-21 16:45:28.000000000 +0200
@@ -5650,11 +5650,11 @@ static void mainloop(void)
#endif
#endif
- errno = 0;
- FD_ZERO(&readfds);
- maxfds = 0;
-
while(!bFinished){
+ errno = 0;
+ maxfds = 0;
+ FD_ZERO (&readfds);
+
/* first check if we have any internal messages queued and spit them out */
processImInternal();

View File

@ -0,0 +1,25 @@
--- rsyslog/syslogd.c.orig 2007-08-28 11:41:08.000000000 +0200
+++ rsyslog/syslogd.c 2007-08-28 12:35:55.000000000 +0200
@@ -2302,8 +2302,20 @@ int shouldProcessThisMessage(selector_t
}
if(f->pCSProgNameComp != NULL) {
- if(rsCStrSzStrCmp(f->pCSProgNameComp, (uchar*) getProgramName(pMsg), getProgramNameLen(pMsg))) {
- /* not equal, so we are already done... */
+ int bInv = 0, bEqv = 0, offset = 0;
+ if(*(rsCStrGetSzStr(f->pCSProgNameComp)) == '-') {
+ if(*(rsCStrGetSzStr(f->pCSProgNameComp) + 1) == '-')
+ offset = 1;
+ else {
+ bInv = 1;
+ offset = 1;
+ }
+ }
+ if(!rsCStrOffsetSzStrCmp(f->pCSProgNameComp, offset, (uchar*) getProgramName(pMsg), getProgramNameLen(pMsg)))
+ bEqv = 1;
+
+ if((!bEqv && !bInv) || (bEqv && bInv)) {
+ /* not equal or inverted selection, so we are already done... */
dbgprintf("programname filter '%s' does not match '%s'\n",
rsCStrGetSzStr(f->pCSProgNameComp), getProgramName(pMsg));
return 0;

View File

@ -2,7 +2,7 @@
Summary: Enhanced system logging and kernel message trapping daemons
Name: rsyslog
Version: 1.19.0
Version: 1.19.2
Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Daemons
@ -10,13 +10,11 @@ URL: http://www.rsyslog.com/
Source0: http://download.adiscon.com/rsyslog/%{name}-%{version}.tar.gz
Source1: rsyslog.init
Source2: rsyslog.sysconfig
Patch1: rsyslog-1.19.0-libPath.patch
Patch2: rsyslog-1.19.0-ommysqlLeak.patch
Patch3: rsyslog-1.19.0-modUnload.patch
Patch4: rsyslog-1.19.0-readfds.patch
Patch1: rsyslog-1.19.2-invertAppSelect.patch
Conflicts: logrotate < 3.5.2
BuildRequires: zlib-devel
BuildRequires: autoconf, automake, libtool
BuildRequires: autoconf automake
Requires: logrotate
Requires: logrotate
Requires: bash >= 2.0
Requires(post): /sbin/chkconfig coreutils
@ -48,11 +46,7 @@ MySQL database support to rsyslog.
%prep
%setup -q
%patch1 -p1 -b .libPath
%patch2 -p1 -b .ommysqlLeak
%patch3 -p1 -b .modUnload
%patch4 -p1 -b .readfds
autoreconf
%patch1 -p1 -b .invertAppSelect
%build
%configure --sbindir=%{sbindir} --disable-static
@ -125,6 +119,11 @@ fi
%{_libdir}/rsyslog/ommysql.so
%changelog
* Tue Aug 28 2007 Peter Vrabec <pvrabec@redhat.com> 1.19.2-1
- upstream bugfix release
- support for negative app selector, patch from
theinric@redhat.com
* Fri Aug 17 2007 Peter Vrabec <pvrabec@redhat.com> 1.19.0-1
- new upstream release with MySQL support(as plugin)

View File

@ -1,3 +1,3 @@
5a1852cd86e55dd0d3125e0d7a6af1ca rsyslog-1.19.0.tar.gz
fe8fcd90c672701fa198dd1206df64ae rsyslog.init
e10d2dc3238c2cf2a54933f10b19b9bf rsyslog.sysconfig
d4066f735ce235bc2ef1f1409262ec57 rsyslog-1.19.2.tar.gz