Date: Tue, 29 Apr 2003 18:40:20 +0400 (MSD) From: Dmitry Sivachenko <mitya@cavia.pp.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/51587: syslogd prints corrupted timestamp in certain cases Message-ID: <200304291440.h3TEeKTm000570@tear.demos.su> Resent-Message-ID: <200304291450.h3TEoA9u094696@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 51587 >Category: bin >Synopsis: syslogd prints corrupted timestamp in certain cases >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 29 07:50:09 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Dmitry Sivachenko >Release: FreeBSD 4.8-STABLE i386 >Organization: >Environment: System: FreeBSD tear.demos.su 4.8-STABLE FreeBSD 4.8-STABLE #5: Tue Apr 29 16:23:39 MSD 2003 mitya@tear.demos.su:/usr/src/sys/compile/TEAR i386 >Description: >How-To-Repeat: When syslogd is running, try to start a second syslogd daemon. Observe the following on the console: <garbage> syslogd: bind: Address already in use You will see garbage instead of timestamp. >Fix: Index: syslogd.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/syslogd/syslogd.c,v retrieving revision 1.113 diff -u -r1.113 syslogd.c --- syslogd.c 21 Feb 2003 19:02:31 -0000 1.113 +++ syslogd.c 29 Apr 2003 14:36:49 -0000 @@ -868,6 +868,7 @@ f->f_file = open(ctty, O_WRONLY, 0); if (f->f_file >= 0) { + (void)strlcpy(f->f_lasttime, timestamp, 16); fprintlog(f, flags, msg); (void)close(f->f_file); } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304291440.h3TEeKTm000570>