summaryrefslogtreecommitdiffstats
path: root/omshell.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-24 11:33:39 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-24 11:33:39 +0000
commit5cbb54ed6ad1934875b080286b9933400c817e85 (patch)
tree8c45cde2e6fe16df01a63f45b2a8ef82645308ef /omshell.c
parentf1e14aefde8c295a2cbd93b9118d32961b6c373f (diff)
downloadrsyslog-5cbb54ed6ad1934875b080286b9933400c817e85.tar.gz
rsyslog-5cbb54ed6ad1934875b080286b9933400c817e85.tar.xz
rsyslog-5cbb54ed6ad1934875b080286b9933400c817e85.zip
major task: made sure no selector_t is created for selector lines that can
not be successfully loaded. That forced me to change a lot of code, with potential for trouble.
Diffstat (limited to 'omshell.c')
-rw-r--r--omshell.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/omshell.c b/omshell.c
index 6b67dff4..80bec178 100644
--- a/omshell.c
+++ b/omshell.c
@@ -91,16 +91,19 @@ static rsRetVal parseSelectorAct(uchar **pp, selector_t *f)
case '^': /* bkalkbrenner 2005-09-20: execute shell command */
dprintf("exec\n");
++p;
- cflineParseFileName(f, p);
- if (f->f_type == F_FILE) {
- f->f_type = F_SHELL;
- }
+ if((iRet = cflineParseFileName(f, p)) == RS_RET_OK)
+ if (f->f_type == F_FILE) {
+ f->f_type = F_SHELL;
+ }
break;
default:
iRet = RS_RET_CONFLINE_UNPROCESSED;
break;
}
+ if(iRet == RS_RET_OK)
+ iRet = RS_RET_CONFLINE_PROCESSED;
+
if(iRet == RS_RET_CONFLINE_PROCESSED)
*pp = p;
return iRet;