summaryrefslogtreecommitdiffstats
path: root/tools
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 /tools
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.
Diffstat (limited to 'tools')
-rw-r--r--tools/omfile.c8
-rw-r--r--tools/syslogd.c2
2 files changed, 3 insertions, 7 deletions
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);
}