diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-20 10:08:06 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-20 10:08:06 +0100 |
commit | 1d3c4454403eb038220f8fd075f0bc836b2e03ed (patch) | |
tree | 3ea761dc28158a61eedee05dd0bfdec8ee295230 /grammar/rainerscript.c | |
parent | 6898e319118bed0e6e6ef3881947a7859fc17912 (diff) | |
download | rsyslog-1d3c4454403eb038220f8fd075f0bc836b2e03ed.tar.gz rsyslog-1d3c4454403eb038220f8fd075f0bc836b2e03ed.tar.bz2 rsyslog-1d3c4454403eb038220f8fd075f0bc836b2e03ed.zip |
regression fix: rsyslog terminated when wild-card $includeFile did not find files
Unfortunately, this is often the case by default in many distros.
Diffstat (limited to 'grammar/rainerscript.c')
-rw-r--r-- | grammar/rainerscript.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index 27ff5376..1116c913 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -2757,6 +2757,9 @@ cnffuncNew(es_str_t *fname, struct cnffparamlst* paramlst) return func; } +/* returns 0 if everything is OK and config parsing shall continue, + * and 1 if things are so wrong that config parsing shall be aborted. + */ int cnfDoInclude(char *name) { @@ -2784,7 +2787,7 @@ cnfDoInclude(char *name) /* Silently ignore wildcards that match nothing */ if(result == GLOB_NOMATCH) { - return 1; + return 0; } if(result == GLOB_NOSPACE || result == GLOB_ABORTED) { @@ -2802,7 +2805,7 @@ cnfDoInclude(char *name) rs_strerror_r(errno, errStr, sizeof(errStr)); parser_errmsg("error accessing config file or directory '%s': %s", cfgFile, errStr); - continue; + return 1; } if(S_ISREG(fileInfo.st_mode)) { /* config file */ |