diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-12 10:14:45 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-12 10:14:45 +0200 |
commit | 1af948107e6e520788e374adccf4986bf07e92f5 (patch) | |
tree | 0b34a726aeae4a459c17f5e9307ad96e39800bee | |
parent | 7f7e5ef75a6183c3b625afe58984343f9b7997be (diff) | |
download | rsyslog-1af948107e6e520788e374adccf4986bf07e92f5.tar.gz rsyslog-1af948107e6e520788e374adccf4986bf07e92f5.tar.xz rsyslog-1af948107e6e520788e374adccf4986bf07e92f5.zip |
fixed abort when emergency configuration was activated
this regression was introduced last friday, so this is *NOT* present
in any released version.
-rw-r--r-- | runtime/conf.c | 1 | ||||
-rw-r--r-- | tools/syslogd.c | 11 |
2 files changed, 5 insertions, 7 deletions
diff --git a/runtime/conf.c b/runtime/conf.c index 412a756d..81b6c081 100644 --- a/runtime/conf.c +++ b/runtime/conf.c @@ -1193,7 +1193,6 @@ cfline(uchar *line, rule_t **pfCurr) break; default: iRet = cflineClassic(line, pfCurr); -ISOBJ_TYPE_assert(*pfCurr, rule); break; } diff --git a/tools/syslogd.c b/tools/syslogd.c index f4b59970..96f3cb34 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -2247,12 +2247,11 @@ init(void) * too low on linux... :-S -- rgerhards, 2008-07-28 */ char szTTYNameBuf[128]; - rule_t *pRule; - CHKiRet(rule.Construct(&pRule)); - conf.cfline((uchar*)"*.ERR\t" _PATH_CONSOLE, &pRule); - conf.cfline((uchar*)"syslog.*\t" _PATH_CONSOLE, &pRule); - conf.cfline((uchar*)"*.PANIC\t*", &pRule); - conf.cfline((uchar*)"syslog.*\troot", &pRule); + rule_t *pRule = NULL; /* initialization to NULL is *vitally* important! */ + conf.cfline(UCHAR_CONSTANT("*.ERR\t" _PATH_CONSOLE), &pRule); + conf.cfline(UCHAR_CONSTANT("syslog.*\t" _PATH_CONSOLE), &pRule); + conf.cfline(UCHAR_CONSTANT("*.PANIC\t*"), &pRule); + conf.cfline(UCHAR_CONSTANT("syslog.*\troot"), &pRule); if(ttyname_r(0, szTTYNameBuf, sizeof(szTTYNameBuf)) == 0) { snprintf(cbuf,sizeof(cbuf), "*.*\t%s", szTTYNameBuf); conf.cfline((uchar*)cbuf, &pRule); |