diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-01-27 12:49:54 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-01-27 12:49:54 +0100 |
commit | cbb9684731c1d56dbe3622141f397f3afbb0f6dc (patch) | |
tree | f842938f5eadb94b8b33358b166df7d5dfa69453 | |
parent | 6c01355579c0ff3da7e8beb8acc59698dbc845c5 (diff) | |
download | rsyslog-cbb9684731c1d56dbe3622141f397f3afbb0f6dc.tar.gz rsyslog-cbb9684731c1d56dbe3622141f397f3afbb0f6dc.tar.xz rsyslog-cbb9684731c1d56dbe3622141f397f3afbb0f6dc.zip |
bugfix: omprog made rsyslog abort on startup if not binary to execute was configured
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | plugins/omprog/omprog.c | 6 | ||||
-rw-r--r-- | runtime/rsyslog.h | 1 |
3 files changed, 9 insertions, 0 deletions
@@ -3,6 +3,8 @@ Version 4.8.1 [v4-stable], 2011-09-?? - increased max config file line size to 64k We now also emit an error message if even 64k is not enough (not doing so previously may rightfully be considered as a bug) +- bugfix: omprog made rsyslog abort on startup if not binary to + execute was configured - bugfix: $ActionExecOnlyOnce interval did not work properly Thanks to Tomas Heinrich for the patch - bugfix: potential abort if ultra-large file io buffers are used and diff --git a/plugins/omprog/omprog.c b/plugins/omprog/omprog.c index 61b81838..633525ac 100644 --- a/plugins/omprog/omprog.c +++ b/plugins/omprog/omprog.c @@ -299,6 +299,12 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) p += sizeof(":omprog:") - 1; /* eat indicator sequence (-1 because of '\0'!) */ CHKiRet(createInstance(&pData)); + if(szBinary == NULL) { + errmsg.LogError(0, RS_RET_CONF_RQRD_PARAM_MISSING, + "no binary to execute specified"); + ABORT_FINALIZE(RS_RET_CONF_RQRD_PARAM_MISSING); + } + CHKmalloc(pData->szBinary = (uchar*) strdup((char*)szBinary)); /* check if a non-standard template is to be applied */ if(*(p-1) == ';') diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h index 03f5120d..43e97171 100644 --- a/runtime/rsyslog.h +++ b/runtime/rsyslog.h @@ -384,6 +384,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth RS_RET_INTERNAL_ERROR = -2175, /**< rsyslogd internal error, unexpected code path reached */ RS_RET_OUTDATED_STMT = -2184, /**< some outdated statement/functionality is being used in conf file */ + RS_RET_CONF_RQRD_PARAM_MISSING = -2208,/**< required parameter in config object is missing */ /* RainerScript error messages (range 1000.. 1999) */ RS_RET_SYSVAR_NOT_FOUND = 1001, /**< system variable could not be found (maybe misspelled) */ |