From 3c236053cf87a16dfd7449f729e477dffd6e2fae Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 18 Dec 2008 12:08:57 +0100 Subject: 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. --- ChangeLog | 5 ++++- omfile.c | 42 +++++++++++++++++++++++------------------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a06dc93..8d7b5b40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,12 @@ --------------------------------------------------------------------------- Version 2.0.7 V2-STABLE (rgerhards), 2008-??-?? +- 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 --------------------------------------------------------------------------- -Version 2.0.6 V2-STABLE (rgerhards), 2008-??-?? +Version 2.0.6 V2-STABLE (rgerhards), 2008-08-07 - bugfix: memory leaks in rsyslogd, primarily in singlethread mode Thanks to Frederico Nunez for providing the fix - bugfix: copy&paste error lead to dangling if - this caused a very minor diff --git a/omfile.c b/omfile.c index 6fcf45ba..7c1ab4f3 100644 --- a/omfile.c +++ b/omfile.c @@ -369,26 +369,30 @@ static void prepareFile(instanceData *pData, uchar *newFileName) */ 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. - */ - } + pData->dirGID, pData->bFailOnChown) != 0) { + return; /* we give up */ + } + } + /* no matter if we needed to create directories or not, we now try to create + * the file. -- rgerhards, 2008-12-18 (based on patch from William Tisater) + */ + 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. + */ } } } -- cgit From db23c5e79a875da684c3828dbc0c5acda8b16083 Mon Sep 17 00:00:00 2001 From: Geoff Simmons Date: Thu, 18 Dec 2008 13:27:07 +0100 Subject: doc bugfix: some spelling errors in man pages corrected Signed-off-by: Rainer Gerhards --- ChangeLog | 2 ++ rsyslogd.8 | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 39839af4..4fc02068 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ - some legacy options were not correctly processed. Thanks to varmojfekoj for the patch. +- doc bugfix: some spelling errors in man pages corrected. Thanks to + Geoff Simmons for the patch. --------------------------------------------------------------------------- Version 3.18.6 (rgerhards), 2008-12-08 - security bugfix: $AllowedSender was not honored, all senders were diff --git a/rsyslogd.8 b/rsyslogd.8 index 91f2016e..6773a9cb 100644 --- a/rsyslogd.8 +++ b/rsyslogd.8 @@ -68,7 +68,7 @@ are in order. First of all there has been a systematic attempt to ensure that rsyslogd follows its default, standard BSD behavior. Of course, some configuration file changes are necessary in order to support the template system. However, rsyslogd should be able to use a standard -syslog.conf and act like the orginal syslogd. However, an original syslogd +syslog.conf and act like the original syslogd. However, an original syslogd will not work correctly with a rsyslog-enhanced configuration file. At best, it will generate funny looking file names. The second important concept to note is that this version of rsyslogd @@ -92,13 +92,13 @@ the error element is ignored. It is tried to parse the rest of the line. .B -c option controls the backward compatibility mode in use. .TP .BI "\-A" -When sending UDP messages, there are potentially multiple pathes to +When sending UDP messages, there are potentially multiple paths to the target destination. By default, .B rsyslogd only sends to the first target it can successfully send to. If -A is given, messages are sent to all targets. This may improve -reliability, but may also cause message duplicaton. This option -should enabled only if it is fully understood. +reliability, but may also cause message duplication. This option +should be enabled only if it is fully understood. .TP .BI "\-4" Causes @@ -129,7 +129,7 @@ to sysklogd, which is the default if -c is not given. .B Please note that rsyslogd issues warning messages if the -c3 .B command line option is not given. This is to alert you that your are running in compatibility -mode. Compatibility mode interfers with you rsyslog.conf commands and +mode. Compatibility mode interferes with your rsyslog.conf commands and may cause some undesired side-effects. It is meant to be used with a plain old rsyslog.conf - if you use new features, things become messy. So the best advice is to work through this document, convert @@ -167,7 +167,7 @@ is started and controlled by .BR init (8). .TP .BI "\-q " "add hostname if DNS fails during ACL processing" -During ACL processing, hostnames are resolved to IP addreses for +During ACL processing, hostnames are resolved to IP addresses for performance reasons. If DNS fails during that process, the hostname is added as wildcard text, which results in proper, but somewhat slower operation once DNS is up again. @@ -190,7 +190,7 @@ no domain would be cut, you will have to specify two domains like: Print version and exit. .TP .B "\-w" -Supress warnings issued when messages are received from non-authorized +Suppress warnings issued when messages are received from non-authorized machines (those, that are in no AllowedSender list). .TP .B "\-x" @@ -336,7 +336,7 @@ you can't access the documentation... .TP .B RSYSLOG_DEBUGLOG -If set, writes (allmost) all debug message to the specified log file +If set, writes (almost) all debug message to the specified log file in addition to stdout. .TP .B RSYSLOG_MODDIR @@ -344,7 +344,7 @@ Provides the default directory in which loadable modules reside. .PD .SH BUGS Please review the file BUGS for up-to-date information on known -bugs and annouyances. +bugs and annoyances. .SH Further Information Please visit .BR http://www.rsyslog.com/doc -- cgit From 20ff1ed403f05606b68c13e4d5c591c6b8706f86 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 12 Jan 2009 13:05:45 +0100 Subject: 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 the bug. --- ChangeLog | 4 ++++ net.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1abdb9ca..cf7f0ef2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +- 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 + the bug. - some legacy options were not correctly processed. Thanks to varmojfekoj for the patch. - doc bugfix: some spelling errors in man pages corrected. Thanks to diff --git a/net.c b/net.c index 54d162bf..788d5412 100644 --- a/net.c +++ b/net.c @@ -105,6 +105,30 @@ setAllowRoot(struct AllowedSenders **ppAllowRoot, uchar *pszType) finalize_it: RETiRet; } +/* re-initializes (sets to NULL) the correct allow root pointer + * rgerhards, 2009-01-12 + */ +static inline rsRetVal +reinitAllowRoot(uchar *pszType) +{ + DEFiRet; + + if(!strcmp((char*)pszType, "UDP")) + pAllowedSenders_UDP = NULL; + else if(!strcmp((char*)pszType, "TCP")) + pAllowedSenders_TCP = NULL; +#ifdef USE_GSSAPI + else if(!strcmp((char*)pszType, "GSS")) + pAllowedSenders_GSS = NULL; +#endif + else { + dbgprintf("program error: invalid allowed sender ID '%s', denying...\n", pszType); + ABORT_FINALIZE(RS_RET_CODE_ERR); /* everything is invalid for an invalid type */ + } + +finalize_it: + RETiRet; +} /* Code for handling allowed/disallowed senders @@ -214,6 +238,11 @@ clearAllowedSenders(uchar *pszType) free(pPrev->allowedSender.addr.NetAddr); free(pPrev); } + + /* indicate root pointer is de-init (was forgotten previously, resulting in + * all kinds of interesting things) -- rgerhards, 2009-01-12 + */ + reinitAllowRoot(pszType); } -- cgit From 40514075c692195290306cd3928b5ce78f2aa38c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 19 Jan 2009 11:14:57 +0100 Subject: prepared for 3.20.3 release --- ChangeLog | 2 ++ configure.ac | 2 +- doc/manual.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d086ea2a..bccb1f89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +--------------------------------------------------------------------------- +Version 3.20.3 [v3-stable] (rgerhards), 2009-01-19 - doc bugfix: v3-compatiblity document had typo in config directive thanks to Andrej for reporting this - fixed a potential segfault condition with $AllowedSender directive diff --git a/configure.ac b/configure.ac index 7fa59012..7af05e43 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[3.20.2],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[3.20.3],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([ChangeLog]) AC_CONFIG_HEADERS([config.h]) diff --git a/doc/manual.html b/doc/manual.html index 12020fbd..1d6f7952 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -16,7 +16,7 @@ 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 professional rsyslog support available directly from the source!

-

This documentation is for version 3.20.2 (v3-stable branch) of rsyslog. +

This documentation is for version 3.20.3 (v3-stable branch) of rsyslog. Visit the rsyslog status page to obtain current version information and project status.

If you like rsyslog, you might -- cgit