summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-10-05 12:38:40 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-10-05 12:38:40 +0200
commit0d7521d59167e47dd5c085d34edf3cd06e45cfc1 (patch)
treec2f3482f0414206b14545857b52a6bbe57f24d88
parent21aef2dffdc958cd92c7ac174fc398b4265acd6d (diff)
downloadrsyslog-0d7521d59167e47dd5c085d34edf3cd06e45cfc1.tar.gz
rsyslog-0d7521d59167e47dd5c085d34edf3cd06e45cfc1.tar.xz
rsyslog-0d7521d59167e47dd5c085d34edf3cd06e45cfc1.zip
bugfix: invalid storage class selected for some size config parameters.
This resulted in wrong values. The most prominent victim was the directory creation mode, which was set to zero in some cases. For details, see related blog post: http://blog.gerhards.net/2009/10/another-note-on-hard-to-find-bugs.html This replaces the improper bugfix from two commits ago with a proper one.
-rw-r--r--ChangeLog5
-rw-r--r--tools/omfile.c8
-rw-r--r--tools/syslogd.c2
3 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a40032b..e615ecb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
Version 4.5.5 [v4-beta] (rgerhards), 2009-09-??
- added $InputTCPServerNotifyOnConnectionClose config directive
see doc for details
+- bugfix: invalid storage class selected for some size config parameters.
+ This resulted in wrong values. The most prominent victim was the
+ directory creation mode, which was set to zero in some cases. For
+ details, see related blog post:
+ http://blog.gerhards.net/2009/10/another-note-on-hard-to-find-bugs.html
---------------------------------------------------------------------------
Version 4.5.4 [v4-beta] (rgerhards), 2009-09-29
- bugfix: potential segfault in stream writer on destruction
diff --git a/tools/omfile.c b/tools/omfile.c
index c938f18c..9d6b3d1d 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -102,7 +102,7 @@ static int bCreateDirs; /* auto-create directories for dynaFiles: 0 - no, 1 - ye
static int bEnableSync = 0;/* enable syncing of files (no dash in front of pathname in conf): 0 - no, 1 - yes */
static int iZipLevel = 0; /* zip compression mode (0..9 as usual) */
static bool bFlushOnTXEnd = 1;/* flush write buffers when transaction has ended? */
-static int iIOBufSize = IOBUF_DFLT_SIZE; /* size of an io buffer */
+static int64 iIOBufSize = IOBUF_DFLT_SIZE; /* size of an io buffer */
static int iFlushInterval = FLUSH_INTRVL_DFLT; /* how often flush the output buffer on inactivity? */
static uchar *pszTplName = NULL; /* name of the default template to use */
/* end globals for default values */
@@ -618,7 +618,6 @@ ENDdoAction
BEGINparseSelectorAct
CODESTARTparseSelectorAct
-dbgprintf("XXX: dir create mode, enter omfile, 0%3.3o set in action\n", fDirCreateMode);
if(!(*p == '$' || *p == '?' || *p == '|' || *p == '/' || *p == '-'))
ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);
@@ -680,7 +679,6 @@ dbgprintf("XXX: dir create mode, enter omfile, 0%3.3o set in action\n", fDirCre
pData->iDynaFileCacheSize = iDynaFileCacheSize;
pData->fCreateMode = fCreateMode;
pData->fDirCreateMode = fDirCreateMode;
-dbgprintf("XXX: dir create mode 0%3.3o set in action\n", fDirCreateMode);
pData->bCreateDirs = bCreateDirs;
pData->bFailOnChown = bFailOnChown;
pData->fileUID = fileUID;
@@ -689,7 +687,7 @@ dbgprintf("XXX: dir create mode 0%3.3o set in action\n", fDirCreateMode);
pData->dirGID = dirGID;
pData->iZipLevel = iZipLevel;
pData->bFlushOnTXEnd = bFlushOnTXEnd;
- pData->iIOBufSize = iIOBufSize;
+ pData->iIOBufSize = (int) iIOBufSize;
pData->iFlushInterval = iFlushInterval;
if(pData->bDynamicName == 0) {
@@ -766,8 +764,6 @@ ENDqueryEtryPt
BEGINmodInit(File)
CODESTARTmodInit
- fDirCreateMode = 0700; /* for some reason, we need to do this write, else the variable always is 0 :S */
-
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 88588621..60e162f8 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -1748,7 +1748,7 @@ static void doexit()
/* set the maximum message size */
-static rsRetVal setMaxMsgSize(void __attribute__((unused)) *pVal, int iNewVal)
+static rsRetVal setMaxMsgSize(void __attribute__((unused)) *pVal, long iNewVal)
{
return glbl.SetMaxLine(iNewVal);
}