summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--msg.c2
-rw-r--r--omfile.c4
3 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cf7f0ef2..08b9abb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+- bugfix: the default for $DirCreateMode was 0644, and as such wrong.
+ It has now been changed to 0700. For some background, please see
+ http://lists.adiscon.net/pipermail/rsyslog/2009-April/001986.html
- fixed a potential segfault condition with $AllowedSender directive
On HUP, the root pointers were not properly cleaned up. Thanks to
Michael Biebel, olgoat, and Juha Koho for reporting and analyzing
@@ -683,12 +686,18 @@ Version 3.10.0 (rgerhards), 2008-01-07
- much cleaner code due to new objects and removal of single-threading
mode
---------------------------------------------------------------------------
-Version 2.0.7 V2-STABLE (rgerhards), 2008-??-??
+Version 2.0.7 V2-STABLE (rgerhards), 2008-04-14
+- bugfix: the default for $DirCreateMode was 0644, and as such wrong.
+ It has now been changed to 0700. For some background, please see
+ http://lists.adiscon.net/pipermail/rsyslog/2009-April/001986.html
- bugfix: "$CreateDirs off" also disabled file creation
Thanks to William Tisater for analyzing this bug and providing a patch.
The actual code change is heavily based on William's patch.
- bugfix: memory leak in ompgsql
Thanks to Ken for providing the patch
+- bugfix: potential memory leak in msg.c
+ This one did not surface yet and the issue was actually found due to
+ a problem in v4 - but better fix it here, too
---------------------------------------------------------------------------
Version 2.0.6 V2-STABLE (rgerhards), 2008-08-07
- bugfix: memory leaks in rsyslogd, primarily in singlethread mode
diff --git a/msg.c b/msg.c
index 2261593a..324383d3 100644
--- a/msg.c
+++ b/msg.c
@@ -1389,6 +1389,8 @@ void MsgAssignHOSTNAME(msg_t *pMsg, char *pBuf)
{
assert(pMsg != NULL);
assert(pBuf != NULL);
+ if(pMsg->pszHOSTNAME != NULL)
+ free(pMsg->pszHOSTNAME);
pMsg->iLenHOSTNAME = strlen(pBuf);
pMsg->pszHOSTNAME = (uchar*) pBuf;
}
diff --git a/omfile.c b/omfile.c
index 24234c06..26b59dfc 100644
--- a/omfile.c
+++ b/omfile.c
@@ -74,7 +74,7 @@ typedef struct s_dynaFileCacheEntry dynaFileCacheEntry;
/* globals for default values */
static int iDynaFileCacheSize = 10; /* max cache for dynamic files */
static int fCreateMode = 0644; /* mode to use when creating files */
-static int fDirCreateMode = 0644; /* mode to use when creating files */
+static int fDirCreateMode = 0700; /* mode to use when creating files */
static int bFailOnChown; /* fail if chown fails? */
static uid_t fileUID; /* UID to be used for newly created files */
static uid_t fileGID; /* GID to be used for newly created files */
@@ -804,7 +804,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
bFailOnChown = 1;
iDynaFileCacheSize = 10;
fCreateMode = 0644;
- fDirCreateMode = 0644;
+ fDirCreateMode = 0700;
bCreateDirs = 1;
bEnableSync = 0;
if(pszTplName != NULL) {