From 7451f8e283d79f919786e2254b5443cc9ea1e74c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 8 Apr 2008 18:47:43 +0200 Subject: typo fix (but an *interesting* typo) ;) --- doc/v3compatibility.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/v3compatibility.html b/doc/v3compatibility.html index c6e4fec2..f4eef3a1 100644 --- a/doc/v3compatibility.html +++ b/doc/v3compatibility.html @@ -3,7 +3,7 @@ -

Compatibility Notes for rsyslog v4

+

Compatibility Notes for rsyslog v3

Written by Rainer Gerhards (2008-03-28)

Rsyslog aims to be a drop-in replacement for sysklogd. @@ -193,4 +193,4 @@ format with care.

Queue Modes for the Main Message Queue

is available, but should not be used except for a very good reason ("Direct" disables queueing and will potentially lead to message loss on the input side).

- \ No newline at end of file + -- cgit From 1544eb74336d64acdd9250c99d8ab7bbe1de4577 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 9 Apr 2008 12:54:21 +0200 Subject: improved detection of modules being loaded more than once thanks to varmojfekoj for the patch --- modules.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/modules.c b/modules.c index b6164f91..84f017e6 100644 --- a/modules.c +++ b/modules.c @@ -554,26 +554,28 @@ Load(uchar *pModName) { DEFiRet; - size_t iPathLen; + size_t iPathLen, iModNameLen; uchar szPath[PATH_MAX]; - uchar *pModNameBase; - uchar *pModNameDup; - uchar *pExtension; + uchar *pModNameCmp; + int bHasExtension; void *pModHdlr, *pModInit; modInfo_t *pModInfo; assert(pModName != NULL); dbgprintf("Requested to load module '%s'\n", pModName); - if((pModNameDup = (uchar *) strdup((char *) pModName)) == NULL) - ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); + iModNameLen = strlen((char *) pModName); + if(iModNameLen > 3 && !strcmp((char *) pModName + iModNameLen - 3, ".so")) { + iModNameLen -= 3; + bHasExtension = TRUE; + } else + bHasExtension = FALSE; - pModNameBase = (uchar *) basename((char*)pModNameDup); pModInfo = GetNxt(NULL); while(pModInfo != NULL) { - if(!strcmp((char *) pModNameBase, (char *) modGetName(pModInfo))) { + if(!strncmp((char *) pModName, (char *) (pModNameCmp = modGetName(pModInfo)), iModNameLen) && + (!*(pModNameCmp + iModNameLen) || !strcmp((char *) pModNameCmp + iModNameLen, ".so"))) { dbgprintf("Module '%s' already loaded\n", pModName); - free(pModNameDup); ABORT_FINALIZE(RS_RET_OK); } pModInfo = GetNxt(pModInfo); @@ -593,7 +595,6 @@ Load(uchar *pModName) szPath[iPathLen] = '\0'; } else { errmsg.LogError(NO_ERRCODE, "could not load module '%s', path too long\n", pModName); - free(pModNameDup); ABORT_FINALIZE(RS_RET_ERR); } } @@ -603,10 +604,7 @@ Load(uchar *pModName) strncat((char *) szPath, (char *) pModName, sizeof(szPath) - iPathLen - 1); /* now see if we have an extension and, if not, append ".so" */ - for(pExtension = pModNameBase ; *pExtension && *pExtension != '.' ; ++pExtension) - /*DO NOTHING*/; - - if(*pExtension != '.') { + 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 @@ -615,7 +613,6 @@ Load(uchar *pModName) strncat((char *) szPath, ".so", sizeof(szPath) - strlen((char*) szPath) - 1); iPathLen += 3; } - free(pModNameDup); if(iPathLen + strlen((char*) pModName) >= sizeof(szPath)) { errmsg.LogError(NO_ERRCODE, "could not load module '%s', path too long\n", pModName); -- cgit From 3853f06d948703f6a28fa6a131ea04521543d011 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 9 Apr 2008 17:45:43 +0200 Subject: finalized 3.14.2 release --- ChangeLog | 2 ++ doc/manual.html | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac04af2b..70ef3c06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ Version 3.14.2 (rgerhards), 2008-04-?? * misspelled directive name in code processing legacy options - bugfix: some legacy options not correctly interpreted - thanks to varmojfekoj for the patch +- improved detection of modules being loaded more than once + thanks to varmojfekoj for the patch --------------------------------------------------------------------------- Version 3.14.1 (rgerhards), 2008-04-04 - bugfix: some messages were emited without hostname diff --git a/doc/manual.html b/doc/manual.html index 135d2fa0..9d4dbefd 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -1,6 +1,5 @@ rsyslog documentation -

RSyslog - Documentation

@@ -18,9 +17,10 @@ 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 professional rsyslog support available directly from the source!

-

Visit the rsyslog -status page to obtain current -version information and ports. If you like rsyslog, you might +

This documentation is for version 3.14.2 of rsyslog. +Visit the rsyslog status page to obtain current +version information and project status. +

If you like rsyslog, you might want to lend us a helping hand. It doesn't require a lot of time - even a single mouse click helps. Learn how to help the rsyslog project. Due to popular demand, there is now a side-by-side comparison @@ -100,4 +100,4 @@ may find Rainer's blog an interesting read (filter on syslog and rsyslog tags).

- \ No newline at end of file + -- cgit