From owner-freebsd-hackers Thu May 9 13:43:46 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA16286 for hackers-outgoing; Thu, 9 May 1996 13:43:46 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id NAA16268 for ; Thu, 9 May 1996 13:43:40 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA29393; Thu, 9 May 1996 13:41:43 -0700 From: Terry Lambert Message-Id: <199605092041.NAA29393@phaeton.artisoft.com> Subject: Re: date change and wtmp record To: max@sfc.wide.ad.jp Date: Thu, 9 May 1996 13:41:43 -0700 (MST) Cc: terry@lambert.org, freebsd-hackers@FreeBSD.org In-Reply-To: <199605091621.BAA00378@mail.tky007.tth.expo96.ad.jp> from "Masafumi NAKANE/=?ISO-2022-JP?B?GyRCQ2Y6LDJtSjgbKEI=?=" at May 10, 96 01:21:14 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > > The *only* way you could get the bogus character is if some other > > program other than the standard date command is writing it, because > > the standard date command can't write it. > > > > [ eliminate the possible, and whatever is left, however improbable, > > must be the answer ] > > > > You *must* be running some other command to get those entries. > > > > Are you *sure* you aren't running NTP or other network time setting > > commands? > > You gave me a great clue!! Finally, I found what's been causing > this. It was `timed'. I have: > > timedflags="-F myhostname" > > in my /etc/sysconfig. > > Changing the date after killing timed made proper entries in > wtmp. > > Thanks to all of you who have given me suggestions. > > Now, is this expected behavior? No. The bug is in /usr/src/usr.sbin/timed/timed/slave.c. For a true fix, I suggest adding: #define UT_LINE_OLD_TIME "|" #define UT_LINE_NEW_TIME "{" To utmp.h, and then hack timed, last, date, etc. and the utmp(5) man page. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.