From 892e359dceee0e99ced947d1bdb512e7a5733312 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 28 Oct 2005 07:30:38 +0000 Subject: fixed a bug where a NULL-pointer was passed to printf in logmsg(); fixed a bug in make install, where rfc3195d was not installed. --- NEWS | 3 +++ linux/Makefile | 4 ++-- master.make | 3 ++- syslogd.c | 4 ++-- version.h | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 3d220c21..b1114bb1 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ +--------------------------------------------------------------------------- +Version 1.12.1 (RGer), 2005-10-?? - made multithreading work with BSD. Some signal-handling needed to be restructured. Also, there might be a slight delay of up to 10 seconds when huping and terminating rsyslogd under BSD +- fixed a bug where a NULL-pointer was passed to printf() in logmsg(). --------------------------------------------------------------------------- Version 1.12.0 (RGer), 2005-10-26 - moved to a multi-threaded design. single-threading is still optionally diff --git a/linux/Makefile b/linux/Makefile index 5ea4d1e7..0d341184 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -31,13 +31,13 @@ FEATURE_DB=0 FEATURE_REGEXP=1 # Enable RFC 3195 support (REQUIRES LIBLOGGING 0.6.0 or above!) -FEATURE_RFC3195=0 +FEATURE_RFC3195=1 # Enable multithreading via pthreads (very experimental!) FEATURE_PTHREADS=1 # Enable debug mode (much slower code) -FEATURE_DEBUG=0 +FEATURE_DEBUG=1 # The following defines tell us where liblogging is located. This # is only needed if we build with RFC 3195 support. By default, diff --git a/master.make b/master.make index 4df8c5b5..06c18f7a 100644 --- a/master.make +++ b/master.make @@ -66,8 +66,9 @@ clean: clobber: clean rm -f syslogd ksym syslog_tst oops_test TAGS tsyslogd tklogd -install_exec: syslogd +install_exec: syslogd rfc3195d ${INSTALL} -b -s syslogd ${DESTDIR}${BINDIR}/rsyslogd + ${INSTALL} -b -s rfc3195d ${DESTDIR}${BINDIR}/rfc3195d install_man: ${INSTALL} $(VPATH)rfc3195d.8 ${DESTDIR}${MANDIR}/man8/rfc3195d.8 diff --git a/syslogd.c b/syslogd.c index 5f5d3550..30ec2db2 100644 --- a/syslogd.c +++ b/syslogd.c @@ -3683,7 +3683,7 @@ void logmsg(int pri, struct msg *pMsg, int flags) assert(pMsg != NULL); assert(pMsg->pszUxTradMsg != NULL); msg = pMsg->pszUxTradMsg; - dprintf("logmsg: %s, flags %x, from %s, msg %s\n", textpri(pri), flags, pMsg->pszHOSTNAME, msg); + dprintf("logmsg: %s, flags %x, from '%s', msg %s\n", textpri(pri), flags, getRcvFrom(pMsg), msg); #ifndef SYSV omask = sigblock(sigmask(SIGHUP)|sigmask(SIGALRM)); @@ -4316,7 +4316,7 @@ void fprintlog(register struct filed *f) dprintf(" %s:%d/%s\n", f->f_un.f_forw.f_hname, f->f_un.f_forw.port, f->f_un.f_forw.protocol == FORW_UDP ? "udp" : "tcp"); iovCreate(f); - if ( strcmp(f->f_pMsg->pszHOSTNAME, LocalHostName) && NoHops ) + if ( strcmp(getHOSTNAME(f->f_pMsg), LocalHostName) && NoHops ) dprintf("Not sending message to remote.\n"); else { char *psz; diff --git a/version.h b/version.h index b37b6910..fb94d189 100644 --- a/version.h +++ b/version.h @@ -1,2 +1,2 @@ #define VERSION "1.12" -#define PATCHLEVEL "0" +#define PATCHLEVEL "1" -- cgit