summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--plugins/omprog/omprog.c6
-rw-r--r--runtime/rsyslog.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2bf59521..58468a20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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) */