diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-06 08:32:07 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-06 08:32:07 +0200 |
commit | 88fdb0c5ef6a34d28b358c9a50a6b172e25c4ee4 (patch) | |
tree | 8ed4031820199da407f5d15ab23cb006c39bc93b | |
parent | 8ea796903215ecaba737f9fbe89c0e052825535d (diff) | |
download | rsyslog-88fdb0c5ef6a34d28b358c9a50a6b172e25c4ee4.tar.gz rsyslog-88fdb0c5ef6a34d28b358c9a50a6b172e25c4ee4.tar.xz rsyslog-88fdb0c5ef6a34d28b358c9a50a6b172e25c4ee4.zip |
issue a warning if old omusrmsg action syntax is used
-rw-r--r-- | runtime/rsyslog.h | 1 | ||||
-rw-r--r-- | tools/omusrmsg.c | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h index 613a3e7a..d20cd5bb 100644 --- a/runtime/rsyslog.h +++ b/runtime/rsyslog.h @@ -344,6 +344,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth RS_RET_ERR_WRKDIR = -2181, /**< problems with the rsyslog working directory */ RS_RET_WRN_WRKDIR = -2182, /**< correctable problems with the rsyslog working directory */ RS_RET_ERR_QUEUE_EMERGENCY = -2183, /**< some fatal error caused queue to switch to emergency mode */ + RS_RET_OUTDATED_STMT = -2184, /**< some outdated statement/functionality is being used in conf file */ /* RainerScript error messages (range 1000.. 1999) */ RS_RET_SYSVAR_NOT_FOUND = 1001, /**< system variable could not be found (maybe misspelled) */ diff --git a/tools/omusrmsg.c b/tools/omusrmsg.c index c737454f..6d46813e 100644 --- a/tools/omusrmsg.c +++ b/tools/omusrmsg.c @@ -281,9 +281,17 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) */ 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 == '*')) + } else { + if(!*p || !((*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z') + || (*p >= '0' && *p <= '9') || *p == '_' || *p == '.' || *p == '*')) { ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED); + } else { + errmsg.LogError(0, RS_RET_OUTDATED_STMT, + "action '%s' treated as ':omusrmsg:%s' - please " + "change syntax, '%s' will not be supported in the future", + p, p, p); + } + } CHKiRet(createInstance(&pData)); |