From e6e1ff65bcb577df238c9c24d55909bca6febbb3 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 9 Jan 2012 14:17:40 +0100 Subject: removing $Begin, $End, $StrictScoping directives v6.4 will provide the same functionality in a far better way. So we do not want to clutter the code. ------------------------- --- ChangeLog | 5 ++++- doc/Makefile.am | 1 - doc/rsyslog_conf_actions.html | 2 -- doc/scoping.html | 39 --------------------------------------- doc/v6compatibility.html | 3 ++- runtime/conf.c | 5 +++++ 6 files changed, 11 insertions(+), 44 deletions(-) delete mode 100644 doc/scoping.html diff --git a/ChangeLog b/ChangeLog index 93c5f05f..3adb4447 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ --------------------------------------------------------------------------- -Version 6.2.0 [v6-stable], 2011-0?-?? +Version 6.2.0 [v6-stable], 2012-0?-?? - bugfix (kind of): removed numerical part from pri-text see v6 compatibility document for reasons - bugfix: race condition when extracting program name, APPNAME, structured @@ -17,6 +17,9 @@ Version 6.2.0 [v6-stable], 2011-0?-?? - bugfix: potential abort after reading invalid X.509 certificate closes: http://bugzilla.adiscon.com/show_bug.cgi?id=290 Thanks to Tomas Heinrich for the patch +- $Begin, $End, $StrictScoping directives have been removed as v6.4 will + provide the same functionality in a far better way. So we do not want + to clutter the code. --------------------------------------------------------------------------- Version 6.1.12 [BETA], 2011-09-01 - bugfix/security: off-by-two bug in legacy syslog parser, CVE-2011-3200 diff --git a/doc/Makefile.am b/doc/Makefile.am index fe96f960..04fda6b3 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -2,7 +2,6 @@ html_files = \ index.html \ bugs.html \ debug.html \ - scoping.html \ features.html \ generic_design.html \ expression.html \ diff --git a/doc/rsyslog_conf_actions.html b/doc/rsyslog_conf_actions.html index 2bcb4146..2e2293ce 100644 --- a/doc/rsyslog_conf_actions.html +++ b/doc/rsyslog_conf_actions.html @@ -8,8 +8,6 @@ message. In general, message content is written to a kind of "logfile". But also other actions might be done, like writing to a database table or forwarding to another host.
-

Please be sure to read about rsyslog config scoping -in combination with this document.
Templates can be used with all actions. If used, the specified template is used to generate the message content (instead of the default diff --git a/doc/scoping.html b/doc/scoping.html deleted file mode 100644 index be80e922..00000000 --- a/doc/scoping.html +++ /dev/null @@ -1,39 +0,0 @@ - -rsyslog configuration scoping - -

rsyslog configuration scoping

-

Starting with version 6.1.0, rsyslog supports -different scopes inside rsyslog.conf. -Earlier versions had only a single, global scope, where each configuration command affected that global -scope. -This resulted in rather complex configurations. Also many users, even the rsyslog authors, were sometimes -not sure what belonged together. So we started an effort to redo the configuration language. -The initial effort, available in 6.1.0, is scoping for actions. Now, an action can be defined -in its own scope and it will always get a fresh environment, not affected by any config -settings outside of that action definition. Similarly, config statements issues within the -scope do not affect the global scope. This is the recommended ways of defining actions. -

However, the previous mode is still supported and any valid pre-v6 config is a valid v6 config -as well. For those interested in more strict scoping, the "$StrictScoping on" directive can -be used to force the use of scopes inside rsyslog.conf. If given, actions and action directives -can not be specified outside of action scopes. -

Nestings of scope is not permitted. Each $Begin must be matched by a $End. This is currently not -enforced in all cases (end of file), but is considered a syntax error which later versions of rsyslog -will most probably detect. -

Note that scoping is in its infancy. Expect changes, and most importantly enhancements. Currently, -scoping is only supported for actions. As a next step, scoping for inputs is planned. Feedback -on the scoping feature is appreciated. -

Scoping Config Statements

- -

[manual index] [rsyslog site]

-

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

- diff --git a/doc/v6compatibility.html b/doc/v6compatibility.html index 3ed5b77d..bc803d2a 100644 --- a/doc/v6compatibility.html +++ b/doc/v6compatibility.html @@ -39,5 +39,6 @@ much coding. However, if the new config language shall be supported, more changes must be made to plugin code. All project-supported plugins have been upgraded, so this compatibility issue is only of interest for you if you have custom plugins or use some user-contributed plugins from the rsyslog project -that are not maintained by the project itself (omoracle is an example). +that are not maintained by the project itself (omoracle is an example). Please +expect some further plugin instablity during the initial v6 releases. diff --git a/runtime/conf.c b/runtime/conf.c index b324e125..af9d7be7 100644 --- a/runtime/conf.c +++ b/runtime/conf.c @@ -1443,9 +1443,14 @@ BEGINAbstractObjClassInit(conf, 1, OBJ_IS_CORE_MODULE) /* class, version - CHANG CHKiRet(objUse(rule, CORE_COMPONENT)); CHKiRet(objUse(ruleset, CORE_COMPONENT)); + /* These commands will NOT be supported -- the new v6.3 config system provides + * far better methods. We will remove the related code soon. -- rgerhards, 2012-01-09 + */ +#if 0 CHKiRet(regCfSysLineHdlr((uchar *)"begin", 0, eCmdHdlrGetWord, beginConfObj, NULL, NULL, eConfObjGlobal)); CHKiRet(regCfSysLineHdlr((uchar *)"end", 0, eCmdHdlrGetWord, endConfObj, NULL, NULL, eConfObjAlways)); CHKiRet(regCfSysLineHdlr((uchar *)"strictscoping", 0, eCmdHdlrBinary, NULL, &bConfStrictScoping, NULL, eConfObjGlobal)); +#endif CHKiRet(regCfSysLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, NULL, eConfObjAction)); ENDObjClassInit(conf) -- cgit v1.2.3