mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 15:40:43 +01:00
Merge branch 'v3-stable' into beta
Conflicts: modules.c
This commit is contained in:
commit
0f3dbecb86
@ -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
|
||||
|
||||
@ -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>
|
||||
</body></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>
|
||||
</body></html>
|
||||
|
||||
27
modules.c
27
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_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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user