summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2008-03-29 12:14:28 +0100
committerMichael Biebl <biebl@debian.org>2008-03-29 12:14:28 +0100
commit45e27e9006d03436f21a47ed2a0b283503fa2d80 (patch)
treece5e579f8768383b1d9facd78f0737306b62647b
parent3d4464215f5496ec5d9b95954bac9704f9c7b125 (diff)
downloadrsyslog-45e27e9006d03436f21a47ed2a0b283503fa2d80.tar.gz
Imported Upstream version 1.19.2upstream/1.19.2
-rw-r--r--ChangeLog8
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac4
-rw-r--r--doc/rsyslog_packages.html7
-rw-r--r--doc/status.html8
-rw-r--r--msg.c4
-rw-r--r--omfile.c93
-rw-r--r--syslogd.c2
8 files changed, 87 insertions, 59 deletions
diff --git a/ChangeLog b/ChangeLog
index bd08925..d937fc8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
---------------------------------------------------------------------------
+Version 1.19.2 (rgerhards), 2007-08-28
+- a specifically formed message caused a segfault - Many thanks varmojfekoj
+ for providing a patch
+- a typo and a weird condition are fixed in msg.c - Thanks again
+ varmojfekoj
+- on file creation the file was always owned by root:root. This is fixed
+ now - Thanks ypsa for solving this issue
+---------------------------------------------------------------------------
Version 1.19.1 (rgerhards), 2007-08-22
- a bug that caused a high load when a TCP/UDP connection was closed is
fixed now - Thanks mildew for solving this issue
diff --git a/configure b/configure
index e89fa9c..45efb3f 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for rsyslog 1.19.1.
+# Generated by GNU Autoconf 2.61 for rsyslog 1.19.2.
#
# Report bugs to <rsyslog@lists.adiscon.com.>.
#
@@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='rsyslog'
PACKAGE_TARNAME='rsyslog'
-PACKAGE_VERSION='1.19.1'
-PACKAGE_STRING='rsyslog 1.19.1'
+PACKAGE_VERSION='1.19.2'
+PACKAGE_STRING='rsyslog 1.19.2'
PACKAGE_BUGREPORT='rsyslog@lists.adiscon.com.'
ac_unique_file="syslogd.c"
@@ -1397,7 +1397,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures rsyslog 1.19.1 to adapt to many kinds of systems.
+\`configure' configures rsyslog 1.19.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1467,7 +1467,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of rsyslog 1.19.1:";;
+ short | recursive ) echo "Configuration of rsyslog 1.19.2:";;
esac
cat <<\_ACEOF
@@ -1579,7 +1579,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-rsyslog configure 1.19.1
+rsyslog configure 1.19.2
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1593,7 +1593,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by rsyslog $as_me 1.19.1, which was
+It was created by rsyslog $as_me 1.19.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2283,7 +2283,7 @@ fi
# Define the identity of the package.
PACKAGE=rsyslog
- VERSION=1.19.1
+ VERSION=1.19.2
cat >>confdefs.h <<_ACEOF
@@ -24006,7 +24006,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by rsyslog $as_me 1.19.1, which was
+This file was extended by rsyslog $as_me 1.19.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -24059,7 +24059,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-rsyslog config.status 1.19.1
+rsyslog config.status 1.19.2
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index cdcd28d..d9103d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([rsyslog],[1.19.1],[rsyslog@lists.adiscon.com.])
-AM_INIT_AUTOMAKE(rsyslog, 1.19.1)
+AC_INIT([rsyslog],[1.19.2],[rsyslog@lists.adiscon.com.])
+AM_INIT_AUTOMAKE(rsyslog, 1.19.2)
AC_CONFIG_SRCDIR([syslogd.c])
AC_CONFIG_HEADER([config.h])
diff --git a/doc/rsyslog_packages.html b/doc/rsyslog_packages.html
index 32d282f..38c43c9 100644
--- a/doc/rsyslog_packages.html
+++ b/doc/rsyslog_packages.html
@@ -24,10 +24,17 @@ functionality. If you need that, you need to compile from the source tarball
<h2>BSD</h2>
<p>Give <a href="http://www.freshports.org/sysutils/rsyslog/">
http://www.freshports.org/sysutils/rsyslog/</a> a try.</p>
+
<h2>CentOS 4.3</h2>
<a href="http://www.se-community.com/~james/rsyslog/">
http://www.se-community.com/~james/rsyslog/</a></p>
<p>Maintained by<b> James Bergamin.</b></p>
+
+<h2>openSUSE</h2>
+<a href="http://download.opensuse.org/repositories/home:/darix/">
+http://download.opensuse.org/repositories/home:/darix/</a></p>
+<p>Maintained by<b> darix</b></p>
+
<h2>Almost any Linux</h2>
<p><b>Bennet Todd</b> maintains packages that should work on almost any Linux.
He keeps a current i386 tree. There is also a PPC tree, but that one is not paid
diff --git a/doc/status.html b/doc/status.html
index 786fcc6..3da059d 100644
--- a/doc/status.html
+++ b/doc/status.html
@@ -4,11 +4,11 @@
</head>
<body>
<h2>rsyslog status page</h2>
-<p>This page reflects the status as of 2007-08-22.</p>
+<p>This page reflects the status as of 2007-08-28.</p>
<h2>Current Releases</h2>
-<p><b>development:</b> 1.19.1 -
-<a href="http://www.rsyslog.com/Article117.phtml">change log</a> -
-<a href="http://www.rsyslog.com/Downloads-index-req-getit-lid-53.phtml">download</a></p>
+<p><b>development:</b> 1.19.2 -
+<a href="http://www.rsyslog.com/Article119.phtml">change log</a> -
+<a href="http://www.rsyslog.com/Downloads-index-req-getit-lid-54.phtml">download</a></p>
<p><b>stable:</b> 1.0.5 - <a href="http://www.rsyslog.com/Article85.phtml">change log</a> -
<a href="http://www.rsyslog.com/Downloads-index-req-getit-lid-39.phtml">download</a></p>
<p>&nbsp;(<a href="version_naming.html">How are versions named?</a>)</p>
diff --git a/msg.c b/msg.c
index 3ba92b1..30fe7d4 100644
--- a/msg.c
+++ b/msg.c
@@ -1615,12 +1615,10 @@ char *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
if(*(pRes + iLn - 1) == '\n') {
/* we have a LF! */
/* check if we need to obtain a private copy */
- if(pbMustBeFreed == 0) {
+ if(*pbMustBeFreed == 0) {
/* ok, original copy, need a private one */
pB = malloc((iLn + 1) * sizeof(char));
if(pB == NULL) {
- if(*pbMustBeFreed == 1)
- free(pRes);
*pbMustBeFreed = 0;
return "**OUT OF MEMORY**";
}
diff --git a/omfile.c b/omfile.c
index af59402..dff4c1b 100644
--- a/omfile.c
+++ b/omfile.c
@@ -348,6 +348,50 @@ static void dynaFileFreeCache(instanceData *pData)
}
+/* This is a shared code for both static and dynamic files.
+ */
+static void prepareFile(instanceData *pData, uchar *newFileName)
+{
+ if(access((char*)newFileName, F_OK) == 0) {
+ /* file already exists */
+ pData->fd = open((char*) newFileName, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY,
+ pData->fCreateMode);
+ } else {
+ /* file does not exist, create it (and eventually parent directories */
+ if(pData->bCreateDirs) {
+ /* we fist need to create parent dirs if they are missing
+ * We do not report any errors here ourselfs but let the code
+ * fall through to error handler below.
+ */
+ if(makeFileParentDirs(newFileName, strlen((char*)newFileName),
+ pData->fDirCreateMode, pData->dirUID,
+ pData->dirGID, pData->bFailOnChown) == 0) {
+ pData->fd = open((char*) newFileName, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY,
+ pData->fCreateMode);
+ if(pData->fd != -1) {
+ /* check and set uid/gid */
+ if(pData->fileUID != (uid_t)-1 || pData->fileGID != (gid_t) -1) {
+ /* we need to set owner/group */
+ if(fchown(pData->fd, pData->fileUID,
+ pData->fileGID) != 0) {
+ if(pData->bFailOnChown) {
+ int eSave = errno;
+ close(pData->fd);
+ pData->fd = -1;
+ errno = eSave;
+ }
+ /* we will silently ignore the chown() failure
+ * if configured to do so.
+ */
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
/* This function handles dynamic file names. It checks if the
* requested file name is already open and, if not, does everything
* needed to switch to the it.
@@ -425,43 +469,7 @@ static int prepareDynFile(instanceData *pData, uchar *newFileName, unsigned iMsg
}
/* Ok, we finally can open the file */
- if(access((char*)newFileName, F_OK) == 0) {
- /* file already exists */
- pData->fd = open((char*) newFileName, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY,
- pData->fCreateMode);
- } else {
- /* file does not exist, create it (and eventually parent directories */
- if(pData->bCreateDirs) {
- /* we fist need to create parent dirs if they are missing
- * We do not report any errors here ourselfs but let the code
- * fall through to error handler below.
- */
- if(makeFileParentDirs(newFileName, strlen((char*)newFileName),
- pData->fDirCreateMode, pData->dirUID,
- pData->dirGID, pData->bFailOnChown) == 0) {
- pData->fd = open((char*) newFileName, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY,
- pData->fCreateMode);
- if(pData->fd != -1) {
- /* check and set uid/gid */
- if(pData->fileUID != (uid_t)-1 || pData->fileGID != (gid_t) -1) {
- /* we need to set owner/group */
- if(fchown(pData->fd, pData->fileUID,
- pData->fileGID) != 0) {
- if(pData->bFailOnChown) {
- int eSave = errno;
- close(pData->fd);
- pData->fd = -1;
- errno = eSave;
- }
- /* we will silently ignore the chown() failure
- * if configured to do so.
- */
- }
- }
- }
- }
- }
- }
+ prepareFile(pData, newFileName);
/* file is either open now or an error state set */
if(pData->fd == -1) {
@@ -729,11 +737,18 @@ CODESTARTparseSelectorAct
pData->bDynamicName = 0;
pData->fCreateMode = fCreateMode; /* preserve current setting */
+ pData->fDirCreateMode = fDirCreateMode;
+ pData->bCreateDirs = bCreateDirs;
+ pData->bFailOnChown = bFailOnChown;
+ pData->fileUID = fileUID;
+ pData->fileGID = fileGID;
+ pData->dirUID = dirUID;
+ pData->dirGID = dirGID;
+
if(pData->fileType == eTypePIPE) {
pData->fd = open(pData->f_fname, O_RDWR|O_NONBLOCK);
} else {
- pData->fd = open(pData->f_fname, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY,
- pData->fCreateMode);
+ prepareFile(pData, pData->f_fname);
}
if ( pData->fd < 0 ){
diff --git a/syslogd.c b/syslogd.c
index f7eeb6a..5920988 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2435,7 +2435,7 @@ static rsRetVal callAction(msg_t *pMsg, action_t *pAction)
/* suppress duplicate lines to this file
*/
- if ((pAction->f_ReduceRepeated == 1) &&
+ if ((pAction->f_ReduceRepeated == 1) && pAction->f_pMsg != NULL &&
(pMsg->msgFlags & MARK) == 0 && getMSGLen(pMsg) == getMSGLen(pAction->f_pMsg) &&
!strcmp(getMSG(pMsg), getMSG(pAction->f_pMsg)) &&
!strcmp(getHOSTNAME(pMsg), getHOSTNAME(pAction->f_pMsg))) {