bin/51587: syslogd prints corrupted timestamp in certain cases

Dmitry Sivachenko mitya at cavia.pp.ru
Tue Apr 29 07:50:11 PDT 2003


>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 at 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:


More information about the freebsd-bugs mailing list