summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--configure.ac24
-rw-r--r--doc/manual.html15
-rw-r--r--doc/rsyslog_ng_comparison.html8
-rw-r--r--doc/status.html10
-rw-r--r--plugins/im3195/im3195.c2
-rw-r--r--runtime/Makefile.am4
-rw-r--r--runtime/conf.c6
-rw-r--r--runtime/modules.c108
-rw-r--r--tools/omfile.c2
-rw-r--r--tools/rsyslogd.88
11 files changed, 140 insertions, 63 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a02d675..41aef49f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
---------------------------------------------------------------------------
-Version 3.21.6 [DEVEL] (rgerhards), 2008-10-??
+Version 3.23.1 [DEVEL] (rgerhards), 2008-10-??
********************************* WARNING *********************************
This version has a slightly different on-disk format for message entries.
@@ -21,12 +21,18 @@ version before switching to this one.
receive loop (aka receiving messsages at a high rate)
- doc bugfix: queue doc had wrong parameter name for setting controlling
worker thread shutdown period
+---------------------------------------------------------------------------
+Version 3.21.6 [DEVEL] (rgerhards), 2008-10-22
- consolidated time calls during msg object creation, improves performance
and consistency
+- bugfix: solved a segfault condition
- bugfix: subsecond time properties generated by imfile, imklog and
internal messages could be slightly inconsistent
- bugfix: (potentially big) memory leak on HUP if queues could not be
drained before timeout - thanks to David Lang for pointing this out
+- added capability to support multiple module search pathes. Thank
+ to Marius Tomaschewski for providing the patch.
+- bugfix: im3195 did no longer compile
---------------------------------------------------------------------------
Version 3.21.5 [DEVEL] (rgerhards), 2008-09-30
- performance optimization: unnecessary time() calls during message
@@ -133,11 +139,15 @@ Version 3.21.0 [DEVEL] (rgerhards), 2008-07-18
- imported all changes from 3.18.1 until today (some quite important,
see below)
---------------------------------------------------------------------------
-Version 3.19.12 [BETA] (rgerhards), 2008-08-25
+Version 3.19.12 [BETA] (rgerhards), 2008-10-16
- bugfix: subseconds where not correctly extracted from a timestamp
if that timestamp did not contain any subsecond information (the
resulting string was garbagge but should have been "0", what it
now is).
+- increased maximum size of a configuration statement to 4K (was 1K)
+- imported all fixes from the stable branch (quite a lot)
+- bugfix: (potentially big) memory leak on HUP if queues could not be
+ drained before timeout - thanks to David Lang for pointing this out
---------------------------------------------------------------------------
Version 3.19.11 [BETA] (rgerhards), 2008-08-25
This is a refresh of the beta. No beta-specific fixes have been added.
@@ -971,6 +981,8 @@ Version 3.10.0 (rgerhards), 2008-01-07
mode
---------------------------------------------------------------------------
Version 2.0.6 V2-STABLE (rgerhards), 2008-??-??
+- bugfix: memory leaks in rsyslogd, primarily in singlethread mode
+ Thanks to Frederico Nunez for providing the fix
- bugfix: copy&paste error lead to dangling if - this caused a very minor
issue with re-formatting a RFC3164 date when the message was invalidly
formatted and had a colon immediately after the date. This was in the
diff --git a/configure.ac b/configure.ac
index e1bc248c..2f17e575 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],[3.21.6-Test1],[rsyslog@lists.adiscon.com])
+AC_INIT([rsyslog],[3.23.1],[rsyslog@lists.adiscon.com])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([ChangeLog])
AC_CONFIG_HEADERS([config.h])
@@ -156,6 +156,28 @@ fi
+# Additional module directories
+AC_ARG_WITH(moddirs,
+ [AS_HELP_STRING([--with-moddirs=DIRS],[Additional module search paths appended to @<:@$libdir/rsyslog@:>@])],
+ [_save_IFS=$IFS ; IFS=$PATH_SEPARATOR ; moddirs=""
+ for w in ${with_moddirs} ;
+ do
+ case $w in
+ "") continue ;; */) ;; *) w="${w}/" ;;
+ esac
+ for m in ${moddirs} ;
+ do
+ test "x$w" = "x${libdir}/${PACKAGE}/" || \
+ test "x$w" = "x$m" || test "x$w" = "x/" && \
+ continue 2
+ done
+ case $moddirs in
+ "") moddirs="$w" ;; *) moddirs="${moddirs}:${w}" ;;
+ esac
+ done ; IFS=$_save_IFS],[moddirs=""]
+)
+AM_CONDITIONAL(WITH_MODDIRS, test x$moddirs != x)
+AC_SUBST(moddirs)
# Large file support
AC_ARG_ENABLE(largefile,
diff --git a/doc/manual.html b/doc/manual.html
index e40f0c06..884c43c0 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -16,7 +16,7 @@ relay chains while at the same time being very easy to setup for the
novice user. And as we know what enterprise users really need, there is
also <a href="professional_support.html">professional
rsyslog support</a> available directly from the source!</p>
-<p><b>This documentation is for version 3.21.5 (devel branch) of rsyslog.</b>
+<p><b>This documentation is for version 3.21.6 (devel branch) of rsyslog.</b>
Visit the <i> <a href="http://www.rsyslog.com/doc-status.html">rsyslog status page</a></i></b> to obtain current
version information and project status.
</p><p><b>If you like rsyslog, you might
@@ -78,13 +78,12 @@ wiki</a>, a community resource which&nbsp;includes <a href="http://wiki.rsyslog.
<li><a href="http://www.rsyslog.com/module-Static_Docs-view-f-manual.html.phtml">rsyslog
online documentation (most current version only)</a></li>
-<li><a href="http://www.rsyslog.com/PNphpBB2.phtml">rsyslog
-discussion forum - use this for technical support</a></li>
-<li><a href="http://www.rsyslog.com/Topic4.phtml">rsyslog
-change log</a></li>
-<li><a href="http://www.rsyslog.com/Topic3.phtml">rsyslog
-FAQ</a></li><li><a href="http://www.monitorware.com/en/syslog-enabled-products/">syslog
-device configuration guide</a> (off-site)</li>
+<li><a href="http://kb.monitorware.com/rsyslog-f40.html">rsyslog discussion forum - use this for technical support</a></li>
+<li><a href="http://www.rsyslog.com/Topic4.phtml">rsyslog change log</a></li>
+<li><a href="http://www.rsyslog.com/Topic3.phtml">rsyslog FAQ</a></li>
+<li><a href="http://www.monitorware.com/en/syslog-enabled-products/">syslog device configuration guide</a> (off-site)</li>
+<li><a href="http://www.rsyslog.com/PNphpBB2.phtml">rsyslog discussion forum - use this for technical support</a></li>
+<li><a href="http://kb.monitorware.com/rsyslog-f49.html">deutsches rsyslog forum</a> (forum in German language)</li>
</ul>
<p>And don't forget about the <a href="http://lists.adiscon.net/mailman/listinfo/rsyslog">rsyslog
mailing list</a>. If you are interested in the "backstage", you
diff --git a/doc/rsyslog_ng_comparison.html b/doc/rsyslog_ng_comparison.html
index bc99cb8c..2f383f78 100644
--- a/doc/rsyslog_ng_comparison.html
+++ b/doc/rsyslog_ng_comparison.html
@@ -432,17 +432,9 @@ including ability to present channel and priority as visible log data</td>
<td valign="top">yes</td>
<td valign="top">yes</td>
</tr>
-<<<<<<< HEAD:doc/rsyslog_ng_comparison.html
-<tr>
-<td valign="top">native ability to send mail messages</td>
-<td valign="top">yes (<a href="ommail.html">ommail</a>,
-introduced in 3.17.0)</td>
-<td valign="top">not sure...</td>
-=======
<tr><td valign="top">native ability to send mail messages</td>
<td valign="top">yes (<a href="ommail.html">ommail</a>, introduced in 3.17.0)</td>
<td valign="top">no (only via piped external process)</td>
->>>>>>> 3f2856b4b5010dfcaa720b292dc3a655e7b9f6da:doc/rsyslog_ng_comparison.html
</tr>
<tr>
<td valign="top">good timestamp format control; at a
diff --git a/doc/status.html b/doc/status.html
index ec3fbb48..211a17bc 100644
--- a/doc/status.html
+++ b/doc/status.html
@@ -9,12 +9,12 @@
<a href="http://www.rsyslog.com/Article279.phtml">change log</a> -
<a href="http://www.rsyslog.com/Downloads-req-viewdownloaddetails-lid-132.phtml">download</a>
-<br><b>beta:</b> 3.19.11 [2008-08-25] -
-<a href="http://www.rsyslog.com/Article273.phtml">change log</a> -
-<a href="http://www.rsyslog.com/Downloads-req-viewdownloaddetails-lid-129.phtml">download</a></p>
+<br><b>beta:</b> 3.19.12 [2008-10-16] -
+<a href="http://www.rsyslog.com/Article283.phtml">change log</a> -
+<a href="http://www.rsyslog.com/Downloads-req-viewdownloaddetails-lid-134.phtml">download</a></p>
-<p><b>v3 stable:</b> 3.18.4 [2008-09-18] - <a href="http://www.rsyslog.com/Article277.phtml">change log</a> -
-<a href="http://www.rsyslog.com/Downloads-req-viewdownloaddetails-lid-131.phtml">download</a>
+<p><b>v3 stable:</b> 3.18.5 [2008-10-09] - <a href="http://www.rsyslog.com/Article281.phtml">change log</a> -
+<a href="http://www.rsyslog.com/Downloads-req-viewdownloaddetails-lid-133.phtml">download</a>
<br><b>v2 stable:</b> 2.0.6 [2008-08-07] - <a href="http://www.rsyslog.com/Article266.phtml">change log</a> -
<a href="http://www.rsyslog.com/Downloads-req-viewdownloaddetails-lid-125.phtml">download</a>
diff --git a/plugins/im3195/im3195.c b/plugins/im3195/im3195.c
index 32dd8dc1..1c2502fe 100644
--- a/plugins/im3195/im3195.c
+++ b/plugins/im3195/im3195.c
@@ -83,7 +83,7 @@ void OnReceive(srAPIObj __attribute__((unused)) *pMyAPI, srSLMGObj* pSLMG)
srSLMGGetRawMSG(pSLMG, &pszRawMsg);
parseAndSubmitMessage(fromHost, fromHostIP, pszRawMsg, strlen((char*)pszRawMsg),
- MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_FULL_DELAY);
+ MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_FULL_DELAY, (uchar*)"im3195");
}
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
index 7c70dd8d..5e5d08ea 100644
--- a/runtime/Makefile.am
+++ b/runtime/Makefile.am
@@ -85,7 +85,11 @@ librsyslog_la_SOURCES = \
# the files with ../ we need to work on - so that they either become part of the
# runtime or will no longer be needed. -- rgerhards, 2008-06-13
+if WITH_MODDIRS
+librsyslog_la_CPPFLAGS = -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" $(pthreads_cflags)
+else
librsyslog_la_CPPFLAGS = -D_PATH_MODDIR=\"$(pkglibdir)/\" -I$(top_srcdir) $(pthreads_cflags)
+endif
#librsyslog_la_LDFLAGS = -module -avoid-version
librsyslog_la_LIBADD = $(dl_libs) $(rt_libs)
diff --git a/runtime/conf.c b/runtime/conf.c
index e55b8d18..f71d5669 100644
--- a/runtime/conf.c
+++ b/runtime/conf.c
@@ -31,7 +31,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this distribution.
*/
-
+#define CFGLNSIZ 4096 /* the maximum size of a configuraton file line, after re-combination */
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
@@ -392,7 +392,7 @@ processConfFile(uchar *pConfFile)
FILE *cf;
selector_t *fCurr = NULL;
uchar *p;
- uchar cbuf[BUFSIZ];
+ uchar cbuf[CFGLNSIZ];
uchar *cline;
int i;
ASSERT(pConfFile != NULL);
@@ -432,7 +432,7 @@ processConfFile(uchar *pConfFile)
for (p = (uchar*) strchr((char*)cline, '\0'); isspace((int) *--p);)
/*EMPTY*/;
if (*p == '\\') {
- if ((p - cbuf) > BUFSIZ - 30) {
+ if ((p - cbuf) > CFGLNSIZ - 30) {
/* Oops the buffer is full - what now? */
cline = cbuf;
} else {
diff --git a/runtime/modules.c b/runtime/modules.c
index ceb4768c..d5730ede 100644
--- a/runtime/modules.c
+++ b/runtime/modules.c
@@ -570,6 +570,8 @@ Load(uchar *pModName)
int bHasExtension;
void *pModHdlr, *pModInit;
modInfo_t *pModInfo;
+ uchar *pModDirCurr, *pModDirNext;
+ int iLoadCnt;
assert(pModName != NULL);
dbgprintf("Requested to load module '%s'\n", pModName);
@@ -591,48 +593,84 @@ Load(uchar *pModName)
pModInfo = GetNxt(pModInfo);
}
- /* now build our load module name */
- if(*pModName == '/') {
- *szPath = '\0'; /* we do not need to append the path - its already in the module name */
- iPathLen = 0;
- } else {
- *szPath = '\0';
- strncat((char *) szPath, (pModDir == NULL) ? _PATH_MODDIR : (char*) pModDir, sizeof(szPath) - 1);
- iPathLen = strlen((char*) szPath);
- if((szPath[iPathLen - 1] != '/')) {
- if((iPathLen <= sizeof(szPath) - 2)) {
- szPath[iPathLen++] = '/';
- szPath[iPathLen] = '\0';
- } else {
- errmsg.LogError(0, RS_RET_MODULE_LOAD_ERR_PATHLEN, "could not load module '%s', path too long\n", pModName);
+ pModDirCurr = (uchar *)((pModDir == NULL) ? _PATH_MODDIR : (char *)pModDir);
+ pModDirNext = NULL;
+ pModHdlr = NULL;
+ iLoadCnt = 0;
+ do {
+ /* now build our load module name */
+ if(*pModName == '/') {
+ *szPath = '\0'; /* we do not need to append the path - its already in the module name */
+ iPathLen = 0;
+ } else {
+ *szPath = '\0';
+
+ iPathLen = strlen((char *)pModDirCurr);
+ pModDirNext = (uchar *)strchr((char *)pModDirCurr, ':');
+ if(pModDirNext)
+ iPathLen = (size_t)(pModDirNext - pModDirCurr);
+
+ if(iPathLen == 0) {
+ if(pModDirNext) {
+ pModDirCurr = pModDirNext + 1;
+ continue;
+ }
+ break;
+ } else if(iPathLen > sizeof(szPath) - 1) {
+ errmsg.LogError(0, NO_ERRCODE, "could not load module '%s', module path too long\n", pModName);
ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_PATHLEN);
}
+
+ strncat((char *) szPath, (char *)pModDirCurr, iPathLen);
+ iPathLen = strlen((char*) szPath);
+
+ if(pModDirNext)
+ pModDirCurr = pModDirNext + 1;
+
+ if((szPath[iPathLen - 1] != '/')) {
+ if((iPathLen <= sizeof(szPath) - 2)) {
+ szPath[iPathLen++] = '/';
+ szPath[iPathLen] = '\0';
+ } else {
+ errmsg.LogError(0, RS_RET_MODULE_LOAD_ERR_PATHLEN, "could not load module '%s', path too long\n", pModName);
+ ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_PATHLEN);
+ }
+ }
}
- }
- /* ... add actual name ... */
- strncat((char *) szPath, (char *) pModName, sizeof(szPath) - iPathLen - 1);
+ /* ... add actual name ... */
+ strncat((char *) szPath, (char *) pModName, sizeof(szPath) - iPathLen - 1);
+
+ /* now see if we have an extension and, if not, append ".so" */
+ if(!bHasExtension) {
+ /* we do not have an extension and so need to add ".so"
+ * TODO: I guess this is highly importable, so we should change the
+ * algo over time... -- rgerhards, 2008-03-05
+ */
+ /* ... so now add the extension */
+ strncat((char *) szPath, ".so", sizeof(szPath) - strlen((char*) szPath) - 1);
+ iPathLen += 3;
+ }
- /* now see if we have an extension and, if not, append ".so" */
- if(!bHasExtension) {
- /* we do not have an extension and so need to add ".so"
- * TODO: I guess this is highly importable, so we should change the
- * algo over time... -- rgerhards, 2008-03-05
- */
- /* ... so now add the extension */
- strncat((char *) szPath, ".so", sizeof(szPath) - strlen((char*) szPath) - 1);
- iPathLen += 3;
- }
+ if(iPathLen + strlen((char*) pModName) >= sizeof(szPath)) {
+ errmsg.LogError(0, RS_RET_MODULE_LOAD_ERR_PATHLEN, "could not load module '%s', path too long\n", pModName);
+ ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_PATHLEN);
+ }
- if(iPathLen + strlen((char*) pModName) >= sizeof(szPath)) {
- errmsg.LogError(0, RS_RET_MODULE_LOAD_ERR_PATHLEN, "could not load module '%s', path too long\n", pModName);
- ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_PATHLEN);
- }
+ /* complete load path constructed, so ... GO! */
+ dbgprintf("loading module '%s'\n", szPath);
+ pModHdlr = dlopen((char *) szPath, RTLD_NOW);
+ iLoadCnt++;
+
+ } while(pModHdlr == NULL && *pModName != '/' && pModDirNext);
- /* complete load path constructed, so ... GO! */
- dbgprintf("loading module '%s'\n", szPath);
- if(!(pModHdlr = dlopen((char *) szPath, RTLD_NOW))) {
- errmsg.LogError(0, RS_RET_MODULE_LOAD_ERR_DLOPEN, "could not load module '%s', dlopen: %s\n", szPath, dlerror());
+ if(!pModHdlr) {
+ if(iLoadCnt) {
+ errmsg.LogError(0, RS_RET_MODULE_LOAD_ERR_DLOPEN, "could not load module '%s', dlopen: %s\n", szPath, dlerror());
+ } else {
+ errmsg.LogError(0, NO_ERRCODE, "could not load module '%s', ModDir was '%s'\n", szPath,
+ ((pModDir == NULL) ? _PATH_MODDIR : (char *)pModDir));
+ }
ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_DLOPEN);
}
if(!(pModInit = dlsym(pModHdlr, "modInit"))) {
diff --git a/tools/omfile.c b/tools/omfile.c
index 06875fe4..8144386f 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -296,6 +296,8 @@ int resolveFileSizeLimit(instanceData *pData)
execProg(pCmd, 1, pParams);
+ free(pCmd);
+
pData->fd = open((char*) pData->f_fname, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY,
pData->fCreateMode);
diff --git a/tools/rsyslogd.8 b/tools/rsyslogd.8
index 05905412..86c4bf66 100644
--- a/tools/rsyslogd.8
+++ b/tools/rsyslogd.8
@@ -254,6 +254,14 @@ configuration file (default is
will be reread and the
.BR rsyslog (3)
facility is started again.
+Note that this means a full rsyslogd restart is done. This has, among others,
+the consequence that TCP and other connections are torn down. Also, if any
+queues are not running in disk assisted mode or are not set to persist data
+on shutdown, queue data is lost. HUPing rsyslogd is an extremely expensive
+operation and should only be done when actually necessary. Actually, it is
+a rsyslgod stop immediately followed by a restart. Future versions will probably
+include a special handling which only closes files, but will not cause any
+of the other effects.
.TP
.B TERM ", " INT ", " QUIT
.B Rsyslogd