diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-09-09 15:45:50 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-09-09 15:45:50 +0200 |
commit | 782c8b1c361c92f7af4f0a39bc476c0ac57f3e80 (patch) | |
tree | 88a055a53734242811f29c68afa6e4826f190000 | |
parent | 7acbde62c53792ab9a9c1317ec197fe4446941e6 (diff) | |
parent | dd9bdb5566c56a2bb67b09a67410b16e29004568 (diff) | |
download | rsyslog-782c8b1c361c92f7af4f0a39bc476c0ac57f3e80.tar.gz rsyslog-782c8b1c361c92f7af4f0a39bc476c0ac57f3e80.tar.bz2 rsyslog-782c8b1c361c92f7af4f0a39bc476c0ac57f3e80.zip |
Merge branch 'v7-stable' into c9
-rw-r--r-- | ChangeLog | 27 | ||||
-rw-r--r-- | action.c | 2 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | doc/manual.html | 2 | ||||
-rw-r--r-- | plugins/imfile/imfile.c | 2 | ||||
-rw-r--r-- | plugins/imkmsg/kmsg.c | 2 | ||||
-rw-r--r-- | plugins/mmaudit/mmaudit.c | 2 | ||||
-rw-r--r-- | plugins/mmjsonparse/mmjsonparse.c | 2 | ||||
-rw-r--r-- | plugins/mmnormalize/mmnormalize.c | 2 | ||||
-rw-r--r-- | plugins/ommongodb/ommongodb.c | 4 | ||||
-rw-r--r-- | plugins/omsnmp/omsnmp.c | 2 | ||||
-rw-r--r-- | runtime/Makefile.am | 7 | ||||
-rw-r--r-- | runtime/librsgt.c | 10 | ||||
-rw-r--r-- | runtime/librsgt.h | 3 | ||||
-rw-r--r-- | runtime/librsgt_read.c | 4 | ||||
-rw-r--r-- | runtime/msg.c | 4 | ||||
-rw-r--r-- | runtime/msg.h | 2 | ||||
-rw-r--r-- | template.c | 2 | ||||
-rw-r--r-- | template.h | 2 | ||||
-rw-r--r-- | tools/rsgtutil.c | 8 |
20 files changed, 66 insertions, 31 deletions
@@ -1,5 +1,30 @@ --------------------------------------------------------------------------- -Version 7.4.4 [v7.4-stable] 2013-0?-?? +Version 7.4.5 [v7.4-stable] 2013-09-?? +- bugfix: some more build problems with newer json-c versions + Thanks to Michael Biebl for mentioning the problem. +--------------------------------------------------------------------------- +Version 7.4.4 [v7.4-stable] 2013-09-03 +- better error messages in GuardTime signature provider + Thanks to Ahto Truu for providing the patch. +- make rsyslog use the new json-c pkgconfig file if available + Thanks to the Gentoo team for the patches. +- bugfix: imfile parameter "persistStateInterval" was unusable + due to a case typo in imfile; work-around was to use legacy config + Thanks to Brandon Murphy for reporting this bug. +- bugfix: TLV16 flag encoding error in signature files from GT provider + This fixes a problem where the TLV16 flag was improperly encoded. + Unfortunately, existing files already have the bug and may not properly + be processed. The fix uses constants from the GuardTime API lib to + prevent such problems in the future. + Thanks to Ahto Truu for providing the patch. +- bugfix: slightly malformed SMTP handling in ommail +- bugfix: segfault in omprog if no template was provided (now dflt is used) +- bugfix: segfault in ompipe if no template was provided (now dflt is used) +- bugfix: segfault in omsnmp if no template was provided (now dflt is used) +- bugfix: some omsnmp optional config params were flagged as mandatory +- bugfix: segfault in omelasticsearch when resuming queued messages + after restarting Elasticsearch + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=464 - bugfix: imtcp addtlframedelimiter could not be set to zero Thanks to Chris Norton for alerting us. - doc bugfix: remove no-longer existing omtemplate from developer doc @@ -98,7 +98,7 @@ #include <strings.h> #include <time.h> #include <errno.h> -#include <json/json.h> +#include <json.h> #include "dirty.h" #include "template.h" diff --git a/configure.ac b/configure.ac index 24fa4b1f..017116ef 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],[7.4.3],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[7.4.4],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -33,7 +33,9 @@ PKG_PROG_PKG_CONFIG # modules we require PKG_CHECK_MODULES(LIBESTR, libestr >= 0.1.5) -PKG_CHECK_MODULES([JSON_C], [json]) +PKG_CHECK_MODULES([JSON_C], [json],, [ + PKG_CHECK_MODULES([JSON_C], [json-c]) +]) case "${host}" in *-*-linux*) @@ -821,7 +823,7 @@ if test "x$enable_rsyslogrt" = "xyes"; then RSRT_LIBS1="\$(top_builddir)/runtime/librsyslog.la" fi AM_CONDITIONAL(ENABLE_RSYSLOGRT, test x$enable_rsyslogrt = xyes) -RSRT_CFLAGS="\$(RSRT_CFLAGS1) \$(LIBESTR_CFLAGS) \$(JSON_C_FLAGS)" +RSRT_CFLAGS="\$(RSRT_CFLAGS1) \$(LIBESTR_CFLAGS) \$(JSON_C_CFLAGS)" RSRT_LIBS="\$(RSRT_LIBS1) \$(LIBESTR_LIBS) \$(JSON_C_LIBS)" AC_SUBST(RSRT_CFLAGS1) AC_SUBST(RSRT_LIBS1) diff --git a/doc/manual.html b/doc/manual.html index ed22967d..dc6453bc 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -19,7 +19,7 @@ professional services</a> available directly from the source!</p> <p><b>Please visit the <a href="http://www.rsyslog.com/sponsors">rsyslog sponsor's page</a> to honor the project sponsors or become one yourself!</b> We are very grateful for any help towards the project goals.</p> -<p><b>This documentation is for version 7.4.3 (v7.4-stable branch) of rsyslog.</b> +<p><b>This documentation is for version 7.4.4 (v7.4-stable branch) of rsyslog.</b> Visit the <i><a href="http://www.rsyslog.com/status">rsyslog status page</a></i></b> to obtain current version information and project status. </p><p><b>If you like rsyslog, you might diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c index 2e80ffc8..45882fb2 100644 --- a/plugins/imfile/imfile.c +++ b/plugins/imfile/imfile.c @@ -478,7 +478,7 @@ CODESTARTnewInpInst inst->readMode = pvals[i].val.d.n; } else if(!strcmp(inppblk.descr[i].name, "maxlinesatonce")) { inst->maxLinesAtOnce = pvals[i].val.d.n; - } else if(!strcmp(inppblk.descr[i].name, "persistStateInterval")) { + } else if(!strcmp(inppblk.descr[i].name, "persiststateinterval")) { inst->iPersistStateInterval = pvals[i].val.d.n; } else if(!strcmp(inppblk.descr[i].name, "maxsubmitatonce")) { inst->nMultiSub = pvals[i].val.d.n; diff --git a/plugins/imkmsg/kmsg.c b/plugins/imkmsg/kmsg.c index 822d3dbd..172ff4d1 100644 --- a/plugins/imkmsg/kmsg.c +++ b/plugins/imkmsg/kmsg.c @@ -34,7 +34,7 @@ #include <ctype.h> #include <sys/klog.h> #include <sys/sysinfo.h> -#include <json/json.h> +#include <json.h> #include "rsyslog.h" #include "srUtils.h" diff --git a/plugins/mmaudit/mmaudit.c b/plugins/mmaudit/mmaudit.c index 6b6b804c..c7cff2cb 100644 --- a/plugins/mmaudit/mmaudit.c +++ b/plugins/mmaudit/mmaudit.c @@ -43,7 +43,7 @@ #include <errno.h> #include <unistd.h> #include <ctype.h> -#include <json/json.h> +#include <json.h> #include "conf.h" #include "syslogd-types.h" #include "template.h" diff --git a/plugins/mmjsonparse/mmjsonparse.c b/plugins/mmjsonparse/mmjsonparse.c index 35f69aab..b16aef0e 100644 --- a/plugins/mmjsonparse/mmjsonparse.c +++ b/plugins/mmjsonparse/mmjsonparse.c @@ -35,7 +35,7 @@ #include <errno.h> #include <unistd.h> #include <ctype.h> -#include <json/json.h> +#include <json.h> #include "conf.h" #include "syslogd-types.h" #include "template.h" diff --git a/plugins/mmnormalize/mmnormalize.c b/plugins/mmnormalize/mmnormalize.c index fcadc328..f93974a1 100644 --- a/plugins/mmnormalize/mmnormalize.c +++ b/plugins/mmnormalize/mmnormalize.c @@ -40,7 +40,7 @@ #include <unistd.h> #include <libestr.h> #include <libee/libee.h> -#include <json/json.h> +#include <json.h> #include <liblognorm.h> #include "conf.h" #include "syslogd-types.h" diff --git a/plugins/ommongodb/ommongodb.c b/plugins/ommongodb/ommongodb.c index dd997410..ecfd2518 100644 --- a/plugins/ommongodb/ommongodb.c +++ b/plugins/ommongodb/ommongodb.c @@ -33,9 +33,9 @@ #include <stdint.h> #include <time.h> #include <mongo.h> -#include <json/json.h> +#include <json.h> /* For struct json_object_iter, should not be necessary in future versions */ -#include <json/json_object_private.h> +#include <json_object_private.h> #include "rsyslog.h" #include "conf.h" diff --git a/plugins/omsnmp/omsnmp.c b/plugins/omsnmp/omsnmp.c index 8ad424e6..42d1de6b 100644 --- a/plugins/omsnmp/omsnmp.c +++ b/plugins/omsnmp/omsnmp.c @@ -430,7 +430,7 @@ CODESTARTnewActInst } CHKiRet(OMSRsetEntry(*ppOMSR, 0, (uchar*)strdup((pData->tplName == NULL) ? - "RSYSLOG_ForwardFormat" : (char*)pData->tplName), + "RSYSLOG_FileFormat" : (char*)pData->tplName), OMSR_NO_RQD_TPL_OPTS)); CODE_STD_FINALIZERnewActInst diff --git a/runtime/Makefile.am b/runtime/Makefile.am index dea06fe0..34384bea 100644 --- a/runtime/Makefile.am +++ b/runtime/Makefile.am @@ -97,12 +97,13 @@ librsyslog_la_SOURCES = \ # if WITH_MODDIRS -librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" $(PTHREADS_CFLAGS) -I\$(top_srcdir)/tools +librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" else -librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I$(top_srcdir) $(PTHREADS_CFLAGS) -I\$(top_srcdir)/tools -I\$(top_srcdir)/grammar +librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I\$(top_srcdir) -I\$(top_srcdir)/grammar endif #librsyslog_la_LDFLAGS = -module -avoid-version -librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS) +librsyslog_la_CPPFLAGS += $(PTHREADS_CFLAGS) $(LIBEE_CFLAGS) $(LIBUUID_CFLAGS) $(JSON_C_CFLAGS) -I\$(top_srcdir)/tools +librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS) $(LIBEE_LIBS) $(LIBUUID_LIBS) $(JSON_C_LIBS) # # regular expression support diff --git a/runtime/librsgt.c b/runtime/librsgt.c index 85fc7742..a8124568 100644 --- a/runtime/librsgt.c +++ b/runtime/librsgt.c @@ -75,7 +75,7 @@ reportGTAPIErr(gtctx ctx, gtfile gf, char *apiname, int ecode) char errbuf[4096]; snprintf(errbuf, sizeof(errbuf), "%s[%s:%d]: %s", (gf == NULL) ? (uchar*)"" : gf->sigfilename, - apiname, ecode, GT_getErrorString(ecode)); + apiname, ecode, GTHTTP_getErrorString(ecode)); errbuf[sizeof(errbuf)-1] = '\0'; reportErr(ctx, errbuf); } @@ -285,7 +285,9 @@ int tlv8Write(gtfile gf, int flags, int tlvtype, int len) { int r; - r = tlvbufAddOctet(gf, (flags << 5)|tlvtype); + assert((flags & RSGT_TYPE_MASK) == 0); + assert((tlvtype & RSGT_TYPE_MASK) == tlvtype); + r = tlvbufAddOctet(gf, (flags & ~RSGT_FLAG_TLV16) | tlvtype); if(r != 0) goto done; r = tlvbufAddOctet(gf, len & 0xff); done: return r; @@ -296,7 +298,9 @@ tlv16Write(gtfile gf, int flags, int tlvtype, uint16_t len) { uint16_t typ; int r; - typ = ((flags|1) << 15)|tlvtype; + assert((flags & RSGT_TYPE_MASK) == 0); + assert((tlvtype >> 8 & RSGT_TYPE_MASK) == (tlvtype >> 8)); + typ = ((flags | RSGT_FLAG_TLV16) << 8) | tlvtype; r = tlvbufAddOctet(gf, typ >> 8); if(r != 0) goto done; r = tlvbufAddOctet(gf, typ & 0xff); diff --git a/runtime/librsgt.h b/runtime/librsgt.h index bfcc4628..bf9c9c31 100644 --- a/runtime/librsgt.h +++ b/runtime/librsgt.h @@ -151,7 +151,10 @@ struct rsgtstatefile { }; /* Flags and record types for TLV handling */ +#define RSGT_FLAG_NONCRIT 0x80 +#define RSGT_FLAG_FORWARD 0x40 #define RSGT_FLAG_TLV16 0x20 +#define RSGT_TYPE_MASK 0x1f /* error states */ #define RSGTE_IO 1 /* any kind of io error */ diff --git a/runtime/librsgt_read.c b/runtime/librsgt_read.c index a6e33160..a9a50798 100644 --- a/runtime/librsgt_read.c +++ b/runtime/librsgt_read.c @@ -249,7 +249,7 @@ rsgt_tlvRecRead(FILE *fp, tlvrecord_t *rec) NEXTC; rec->hdr[0] = c; rec->tlvtype = c & 0x1f; - if(c & 0x80) { /* tlv16? */ + if(c & RSGT_FLAG_TLV16) { /* tlv16? */ rec->lenHdr = 4; NEXTC; rec->hdr[1] = c; @@ -290,7 +290,7 @@ rsgt_tlvDecodeSUBREC(tlvrecord_t *rec, uint16_t *stridx, tlvrecord_t *newrec) c = rec->data[(*stridx)++]; newrec->hdr[0] = c; newrec->tlvtype = c & 0x1f; - if(c & 0x80) { /* tlv16? */ + if(c & RSGT_FLAG_TLV16) { /* tlv16? */ newrec->lenHdr = 4; if(rec->tlvlen == *stridx) {r=RSGTE_LEN; goto done;} c = rec->data[(*stridx)++]; diff --git a/runtime/msg.c b/runtime/msg.c index 426c80df..39e48039 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -41,9 +41,9 @@ #endif #include <netdb.h> #include <libestr.h> -#include <json/json.h> +#include <json.h> /* For struct json_object_iter, should not be necessary in future versions */ -#include <json/json_object_private.h> +#include <json_object_private.h> #if HAVE_MALLOC_H # include <malloc.h> #endif diff --git a/runtime/msg.h b/runtime/msg.h index 5a54c116..9299704c 100644 --- a/runtime/msg.h +++ b/runtime/msg.h @@ -30,7 +30,7 @@ #include <pthread.h> #include <libestr.h> -#include <json/json.h> +#include <json.h> #include "obj.h" #include "syslogd-types.h" #include "template.h" @@ -34,7 +34,7 @@ #include <string.h> #include <ctype.h> #include <assert.h> -#include <json/json.h> +#include <json.h> #include "stringbuf.h" #include "syslogd-types.h" #include "template.h" @@ -30,7 +30,7 @@ #ifndef TEMPLATE_H_INCLUDED #define TEMPLATE_H_INCLUDED 1 -#include <json/json.h> +#include <json.h> #include <libestr.h> #include "regexp.h" #include "stringbuf.h" diff --git a/tools/rsgtutil.c b/tools/rsgtutil.c index 095b8066..567dcf4c 100644 --- a/tools/rsgtutil.c +++ b/tools/rsgtutil.c @@ -74,7 +74,7 @@ dumpFile(char *name) if(fp != stdin) fclose(fp); return; -err: fprintf(stderr, "error %d processing file %s\n", r, name); +err: fprintf(stderr, "error %d (%s) processing file %s\n", r, RSGTE2String(r), name); } static void @@ -113,7 +113,7 @@ showSigblkParams(char *name) return; err: if(r != RSGTE_EOF) - fprintf(stderr, "error %d processing file %s\n", r, name); + fprintf(stderr, "error %d (%s) processing file %s\n", r, RSGTE2String(r), name); } static void @@ -145,7 +145,7 @@ detectFileType(char *name) if(fp != stdin) fclose(fp); return; -err: fprintf(stderr, "error %d processing file %s\n", r, name); +err: fprintf(stderr, "error %d (%s) processing file %s\n", r, RSGTE2String(r), name); } static inline int @@ -327,7 +327,7 @@ done: return; err: - fprintf(stderr, "error %d processing file %s\n", r, name); + fprintf(stderr, "error %d (%s) processing file %s\n", r, RSGTE2String(r), name); if(logfp != NULL) fclose(logfp); if(sigfp != NULL) |