summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-07-11 11:44:16 +0200
committerMichael Biebl <biebl@debian.org>2011-07-11 11:44:16 +0200
commit6b2af45bc8b2aa4292e3cf92986c01a728ef4d8c (patch)
tree15c4d4604294a232bf1126f969318ed659b2dc52 /tools
parentd5294b644649f563f4aa77735ebc6db6ee1776de (diff)
downloadrsyslog-6b2af45bc8b2aa4292e3cf92986c01a728ef4d8c.tar.gz
Imported Upstream version 5.8.3upstream/5.8.3
Diffstat (limited to 'tools')
-rw-r--r--tools/omfile.c17
-rw-r--r--tools/omusrmsg.c4
2 files changed, 19 insertions, 2 deletions
diff --git a/tools/omfile.c b/tools/omfile.c
index 08f965b..150848e 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -16,7 +16,7 @@
* pipes. These have been moved to ompipe, to reduced the entanglement
* between the two different functionalities. -- rgerhards
*
- * Copyright 2007-2009 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2007-2011 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of rsyslog.
*
@@ -713,6 +713,21 @@ ENDdoAction
BEGINparseSelectorAct
CODESTARTparseSelectorAct
+ /* Note: the indicator sequence permits us to use '$' to signify
+ * outchannel, what otherwise is not possible due to truely
+ * unresolvable grammar conflicts (*this time no way around*).
+ * rgerhards, 2011-07-09
+ */
+ if(!strncmp((char*) p, ":omfile:", sizeof(":omfile:") - 1)) {
+ p += sizeof(":omfile:") - 1;
+ } else {
+ if(*p == '$') {
+ errmsg.LogError(0, RS_RET_OUTDATED_STMT,
+ "action '%s' treated as ':omfile:%s' - please "
+ "change syntax, '%s' will not be supported in "
+ "rsyslog v6 and above.", p, p, p);
+ }
+ }
if(!(*p == '$' || *p == '?' || *p == '/' || *p == '.' || *p == '-'))
ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);
diff --git a/tools/omusrmsg.c b/tools/omusrmsg.c
index 2d99c1e..c737454 100644
--- a/tools/omusrmsg.c
+++ b/tools/omusrmsg.c
@@ -279,7 +279,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);