diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-09 18:10:39 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-09 18:10:39 +0200 |
commit | 0f3dbecb867bc8ed852389ae9642be5d0f3636aa (patch) | |
tree | d7389269cff2682c340bc750ce454a922a66fba3 | |
parent | c574f90c450ece3e336612e232e464b7c8d08ab1 (diff) | |
parent | 3853f06d948703f6a28fa6a131ea04521543d011 (diff) | |
download | rsyslog-0f3dbecb867bc8ed852389ae9642be5d0f3636aa.tar.gz rsyslog-0f3dbecb867bc8ed852389ae9642be5d0f3636aa.tar.xz rsyslog-0f3dbecb867bc8ed852389ae9642be5d0f3636aa.zip |
Merge branch 'v3-stable' into beta
Conflicts:
modules.c
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | doc/manual.html | 10 | ||||
-rw-r--r-- | doc/v3compatibility.html | 4 | ||||
-rw-r--r-- | modules.c | 27 |
4 files changed, 21 insertions, 22 deletions
@@ -40,6 +40,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 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><title>rsyslog documentation</title> - </head> <body> <h1>RSyslog - Documentation</h1> @@ -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 <a href="professional_support.html">professional rsyslog support</a> available directly from the source!</p> -<p><b>Visit the <i> <a href="status.html">rsyslog -status page</a></i></b> to obtain current -version information and ports. <b>If you like rsyslog, you might +<p><b>This documentation is for version 3.14.2 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><b>If you like rsyslog, you might want to lend us a helping hand. </b>It doesn't require a lot of time - even a single mouse click helps. Learn <a href="how2help.html">how to help the rsyslog project</a>. Due to popular demand, there is now a <a href="rsyslog_ng_comparison.html">side-by-side comparison @@ -100,4 +100,4 @@ may find <a href="http://www.gerhards.net/rainer">Rainer</a>'s <a href="http://rgerhards.blogspot.com/">blog</a> an interesting read (filter on syslog and rsyslog tags).</p> -</body></html>
\ No newline at end of file +</body></html> 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 @@ <meta name="KEYWORDS" content="syslog, mysql, syslog to mysql, howto"></head> <body> -<h1>Compatibility Notes for rsyslog v4</h1> +<h1>Compatibility Notes for rsyslog v3</h1> <p><small><i>Written by <a href="http://www.gerhards.net/rainer">Rainer Gerhards</a> (2008-03-28)</i></small></p> <p>Rsyslog aims to be a drop-in replacement for sysklogd. @@ -193,4 +193,4 @@ format with care. </p><h2>Queue Modes for the Main Message Queue</h2> 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).</p> -</body></html>
\ No newline at end of file +</body></html> @@ -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_MODULE_LOAD_ERR_PATHLEN); } } @@ -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); |