diff options
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | runtime/conf.c | 2 | ||||
-rw-r--r-- | tools/syslogd.c | 11 |
3 files changed, 22 insertions, 5 deletions
@@ -222,6 +222,20 @@ version before switching to this one. Thanks to Ken for providing the patch --------------------------------------------------------------------------- Version 3.22.1 [v3-stable] (rgerhards), 2009-04-?? +- bugfix: invalid error message issued if $inlcudeConfig was on an empty + set of files (e.g. *.conf, where none such files existed) + thanks to Michael Biebl for reporting this bug +- bugfix: when run in foreground (but not in debug mode), a + debug message ("DoDie called") was emitted at shutdown. Removed. + thanks to Michael Biebl for reporting this bug +- bugfix: some garbagge was emitted to stderr on shutdown. This + garbage consisted of file names, which were written during + startup (key point: not a pointer error) + thanks to Michael Biebl for reporting this bug +- bugfix: startup and shutdown message were emitted to stdout + thanks to Michael Biebl for reporting this bug +- bugfix: error messages were not emitted to stderr in forked mode + (stderr and stdo are now kept open across forks) - bugfix: internal messages were emitted to whatever file had fd2 when rsyslogd ran in forked mode (as usual!) Thanks to varmojfekoj for the patch diff --git a/runtime/conf.c b/runtime/conf.c index 581254f0..d70bc281 100644 --- a/runtime/conf.c +++ b/runtime/conf.c @@ -216,7 +216,7 @@ doIncludeLine(uchar **pp, __attribute__((unused)) void* pVal) * Required by doIncludeDirectory(). */ result = glob(pattern, GLOB_MARK, NULL, &cfgFiles); - if(result != 0) { + if(result == GLOB_NOSPACE || result == GLOB_ABORTED) { char errStr[1024]; rs_strerror_r(errno, errStr, sizeof(errStr)); errmsg.LogError(0, RS_RET_FILE_NOT_FOUND, "error accessing config file or directory '%s': %s", diff --git a/tools/syslogd.c b/tools/syslogd.c index cfecfd83..034111f5 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -887,7 +887,7 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags) MsgSetRcvFrom(pMsg, glbl.GetLocalHostName()); MsgSetRcvFromIP(pMsg, UCHAR_CONSTANT("127.0.0.1")); /* check if we have an error code associated and, if so, - * adjust the tag. -- r5gerhards, 2008-06-27 + * adjust the tag. -- rgerhards, 2008-06-27 */ if(iErr == NO_ERRCODE) { MsgSetTAG(pMsg, "rsyslogd:"); @@ -910,7 +910,8 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags) * supressor statement. */ if(((Debug || NoFork) && bErrMsgToStderr) || iConfigVerify) { - fprintf(stderr, "rsyslogd: %s\n", msg); + if(LOG_PRI(pri) == LOG_ERR) + fprintf(stderr, "rsyslogd: %s\n", msg); } if(bHaveMainQueue == 0) { /* not yet in queued mode */ @@ -2394,7 +2395,7 @@ init(void) */ snprintf(bufStartUpMsg, sizeof(bufStartUpMsg)/sizeof(char), " [origin software=\"rsyslogd\" " "swVersion=\"" VERSION \ - "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] restart", + "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] (re)start", (int) myPid); logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, (uchar*)bufStartUpMsg, 0); @@ -3055,7 +3056,9 @@ doGlblProcessInit(void) exit(1); /* "good" exit - after forking, not diasabling anything */ } num_fds = getdtablesize(); - for (i= 0; i < num_fds; i++) + close(0); + /* we keep stdout and stderr open in case we have to emit something */ + for (i = 3; i < num_fds; i++) (void) close(i); untty(); } |