From 53957a73fe670d435781b2dd9a8dc458ee68ff03 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 24 Jun 2011 08:42:39 +0200 Subject: preparing for 4.6.6 --- ChangeLog | 2 +- configure.ac | 2 +- doc/manual.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e146785..c0b57449 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ --------------------------------------------------------------------------- -Version 4.6.6 [v4-stable] (rgerhards), 2010-11-?? +Version 4.6.6 [v4-stable] (rgerhards), 2011-06-24 - bugfix: memory leak in imtcp & subsystems under some circumstances This leak is tied to error conditions which lead to incorrect cleanup of some data structures. [backport from v6, limited testing under v4] diff --git a/configure.ac b/configure.ac index 0e5544b1..0a3a7117 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],[4.6.5],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[4.6.6],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([ChangeLog]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/doc/manual.html b/doc/manual.html index aff23c8b..cca6b023 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -19,7 +19,7 @@ rsyslog support available directly from the source!

Please visit the rsyslog sponsor's page to honor the project sponsors or become one yourself! We are very grateful for any help towards the project goals.

-

This documentation is for version 4.6.4 (v4-stable branch) of rsyslog. +

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

If you like rsyslog, you might -- cgit v1.2.3 From 38e7f7852a9b82e055840dd1696a72db2c45f79c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 30 Jun 2011 10:28:09 +0200 Subject: reduced sporadic failures during make check backport from v6 --- plugins/imdiag/imdiag.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/plugins/imdiag/imdiag.c b/plugins/imdiag/imdiag.c index ed6ef509..912c7bbf 100644 --- a/plugins/imdiag/imdiag.c +++ b/plugins/imdiag/imdiag.c @@ -255,6 +255,8 @@ finalize_it: /* This function waits until the main queue is drained (size = 0) + * To make sure it really is drained, we check three times. Otherwise we + * may just see races. */ static rsRetVal waitMainQEmpty(tcps_sess_t *pSess) @@ -264,19 +266,22 @@ waitMainQEmpty(tcps_sess_t *pSess) DEFiRet; CHKiRet(diagGetMainMsgQSize(&iMsgQueueSize)); - while(iMsgQueueSize > 0) { - /* DEV DEBUG ONLY if(iPrint++ % 500) - printf("imdiag: main msg queue size: %d\n", iMsgQueueSize); - */ - if(iPrint++ % 500 == 0) - dbgprintf("imdiag sleeping, wait mainq drain, curr size %d\n", iMsgQueueSize); - srSleep(0,2); /* wait a little bit */ - CHKiRet(diagGetMainMsgQSize(&iMsgQueueSize)); + while(1) { if(iMsgQueueSize == 0) { /* verify that queue is still empty (else it could just be a race!) */ - srSleep(1,5); /* wait a little bit */ + srSleep(0,250000);/* wait a little bit */ CHKiRet(diagGetMainMsgQSize(&iMsgQueueSize)); + if(iMsgQueueSize == 0) { + srSleep(0,500000);/* wait a little bit */ + CHKiRet(diagGetMainMsgQSize(&iMsgQueueSize)); + } } + if(iMsgQueueSize == 0) + break; + if(iPrint++ % 500 == 0) + dbgprintf("imdiag sleeping, wait mainq drain, curr size %d\n", iMsgQueueSize); + srSleep(0,200000);/* wait a little bit */ + CHKiRet(diagGetMainMsgQSize(&iMsgQueueSize)); } CHKiRet(sendResponse(pSess, "mainqueue empty\n")); -- cgit v1.2.3 From 6e222ec9ef8a4575d7113fed957dd79191b8e61b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 2 Jul 2011 00:08:07 +0200 Subject: systemd: direct stdout/stderr of rsyslog to null This allows systemd upstream to set stdout/stderr of all spawned services by default to 'syslog'. In order to avoid log loops rsyslog itself must be have its stdout/stderr connected to 'null' in that case, however. --- rsyslog.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/rsyslog.service.in b/rsyslog.service.in index 898354d5..c03c9004 100644 --- a/rsyslog.service.in +++ b/rsyslog.service.in @@ -5,6 +5,7 @@ Description=System Logging Service ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service ExecStart=@sbindir@/rsyslogd -n -c5 Sockets=syslog.socket +StandardOutput=null [Install] WantedBy=multi-user.target -- cgit v1.2.3 From e8e881e9795e5dc9fc14fd7f34523bcd6ae13106 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Sat, 2 Jul 2011 12:55:54 +0200 Subject: doc: mentioned Lennart's patch in ChangeLog --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index e438ac61..8310d97a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ --------------------------------------------------------------------------- +Version 5.8.3 [V5-stable] (rgerhards), 2011-06-?? +- systemd support: set stdout/stderr to null - thx to Lennart for the patch +--------------------------------------------------------------------------- Version 5.8.2 [V5-stable] (rgerhards), 2011-06-21 - bugfix: problems in failover action handling closes: http://bugzilla.adiscon.com/show_bug.cgi?id=270 -- cgit v1.2.3 From 4b29a27782f74cb3a47be639d62e036a8837a6d6 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 6 Jul 2011 07:23:35 +0200 Subject: doc: ./configure --help invalidly showed imdiag enabled by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to Frédéric L. W. Meunier for bringing this to my attention. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0a3a7117..e3ef1357 100644 --- a/configure.ac +++ b/configure.ac @@ -648,7 +648,7 @@ AM_CONDITIONAL(ENABLE_MAIL, test x$enable_mail = xyes) # would complicate things if we first needed to tell them how to enable imdiag. # rgerhards, 2008-07-25 AC_ARG_ENABLE(imdiag, - [AS_HELP_STRING([--enable-imdiag],[Enable imdiag @<:@default=yes@:>@])], + [AS_HELP_STRING([--enable-imdiag],[Enable imdiag @<:@default=no@:>@])], [case "${enableval}" in yes) enable_imdiag="yes" ;; no) enable_imdiag="no" ;; -- cgit v1.2.3 From f09ee69ee1b7f8c098d0720c8e85a6753cc7d342 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 6 Jul 2011 07:52:50 +0200 Subject: added support for the ":omusrmsg:" syntax in configuring user messages --- ChangeLog | 3 +++ doc/rsyslog_conf_actions.html | 20 +++++++++++++------- tools/omusrmsg.c | 4 +++- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0b57449..be156818 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ --------------------------------------------------------------------------- +Version 4.6.7 [v4-stable] (rgerhards), 2011-06-?? +- added support for the ":omusrmsg:" syntax in configuring user messages +--------------------------------------------------------------------------- Version 4.6.6 [v4-stable] (rgerhards), 2011-06-24 - bugfix: memory leak in imtcp & subsystems under some circumstances This leak is tied to error conditions which lead to incorrect cleanup diff --git a/doc/rsyslog_conf_actions.html b/doc/rsyslog_conf_actions.html index 6020dd88..2e2293ce 100644 --- a/doc/rsyslog_conf_actions.html +++ b/doc/rsyslog_conf_actions.html @@ -23,7 +23,7 @@ definition. If you do this, the action will be ignored.

more precisely a single filter of such a selector line). Each action must be on its own line and the line must start with an ampersand ('&') character and have no filters. An example would be

-

*.=crit rger
+

*.=crit :omusrmsg:rger
& root
& /var/log/critmsgs

These three lines send critical messages to the user rger and @@ -32,7 +32,7 @@ actions per selector is convenient and also offers a performance benefit. As the filter needs to be evaluated only once, there is less computation required to process the directive compared to the otherwise-equal config directives below:

-

*.=crit rger
+

*.=crit :omusrmsg:rger
*.=crit root
*.=crit /var/log/critmsgs

 

@@ -211,13 +211,19 @@ sysklogd,"<%PRI%>%TIMESTAMP% %syslogtag%%msg%\""

List of Users

Usually critical messages are also directed to "root'' on that machine. You can specify a list of users that shall get the -message by simply writing the login. You may specify more than one user -by separating them with commas (",''). If they're logged in they get -the message. Don't think a mail would be sent, that might be too late.

+message by simply writing ":omusrmsg: followed by the login name. For example, +the send messages to root, use ":omusrmsg:root". +You may specify more than one user +by separating them with commas (",''). Do not repeat the ":omusrmsg:" prefix in +this case. For example, to send data to users root and rger, use +":omusrmsg:root,rger" (do not use ":omusrmsg:root,:omusrmsg:rger", this is invalid). +If they're logged in they get +the message.

Everyone logged on

Emergency messages often go to all users currently online to notify them that something strange is happening with the system. To -specify this wall(1)-feature use an asterisk ("*'').

+specify this wall(1)-feature use an asterisk as the user message +destination(":omusrmsg:*'').

Call Plugin

This is a generic way to call an output plugin. The plugin must support this functionality. Actual parameters depend on the @@ -331,7 +337,7 @@ what you can do with it, see "TEMPLATES" at the top of this document.

[rsyslog site]

This documentation is part of the rsyslog project.
-Copyright © 2008 by Rainer Gerhards and +Copyright © 2008-2011 by Rainer Gerhards and Adiscon. Released under the GNU GPL version 2 or higher.

diff --git a/tools/omusrmsg.c b/tools/omusrmsg.c index 768baca7..44b85bd9 100644 --- a/tools/omusrmsg.c +++ b/tools/omusrmsg.c @@ -278,7 +278,9 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) * [a-zA-Z0-9_.] * plus '*' for wall */ - if(!*p || !((*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z') + if(!strncmp((char*) p, ":omusrmsg:", sizeof(":omusrmsg:") - 1)) { + p += sizeof(":omusrmsg:") - 1; /* eat indicator sequence (-1 because of '\0'!) */ + } else if(!*p || !((*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9') || *p == '_' || *p == '.' || *p == '*')) ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED); -- cgit v1.2.3