summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/omfile.c10
-rw-r--r--tools/omusrmsg.c4
2 files changed, 12 insertions, 2 deletions
diff --git a/tools/omfile.c b/tools/omfile.c
index e543ec9b..b7b94597 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.
*
@@ -665,6 +665,14 @@ 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;
+ }
if(!(*p == '$' || *p == '?' || *p == '/' || *p == '.' || *p == '-'))
ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);
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);