Subject: bin/1906: date formatting glitch in newsyslog
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kashmir@umiacs.UMD.EDU>
List: netbsd-bugs
Date: 01/06/1996 15:42:23
>Number: 1906
>Category: bin
>Synopsis: date formatting glitch in newsyslog
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 6 16:05:01 1996
>Last-Modified:
>Originator: Mike Grupenhoff
>Organization:
>Release: -current 960106
>Environment:
System: NetBSD snarf.umiacs.umd.edu 1.1A NetBSD 1.1A (SNARF) #7: Fri Dec 29 23:04:19 EST 1995 kashmir@snarf.umiacs.umd.edu:/usr/src/sys/arch/i386/compile/SNARF i386
>Description:
When newsyslog rotates a file, it adds a line to the top that mimics
the output of syslogd. However, the date in this line has an extra
trailing space. Compare the newsyslog line to the syslog line:
Jan 4 01:00:00 snarf newsyslog[6085]: logfile turned over
Jan 4 03:23:55 snarf pppd[6055]: Excessive lack of response to LCP echo frames.
>How-To-Repeat:
more /var/log/messages
>Fix:
Index: newsyslog.c
===================================================================
RCS file: /snarf/netbsd/master/src/usr.bin/newsyslog/newsyslog.c,v
retrieving revision 1.1
diff -u -r1.1 newsyslog.c
--- newsyslog.c 1995/11/16 02:27:58 1.1
+++ newsyslog.c 1996/01/06 20:40:07
@@ -180,7 +180,7 @@
progname = argv[0];
timenow = time((time_t *) 0);
daytime = ctime(&timenow) + 4;
- daytime[16] = '\0';
+ daytime[15] = '\0';
/* Let's find the pid of syslogd */
syslog_pid = 0;
>Audit-Trail:
>Unformatted: