From owner-freebsd-hackers Wed May 8 18:12:10 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA18005 for hackers-outgoing; Wed, 8 May 1996 18:12:10 -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 SAA17999 for ; Wed, 8 May 1996 18:12:08 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id SAA27469; Wed, 8 May 1996 18:11:29 -0700 From: Terry Lambert Message-Id: <199605090111.SAA27469@phaeton.artisoft.com> Subject: Re: date change and wtmp record To: max@sfc.wide.ad.jp Date: Wed, 8 May 1996 18:11:29 -0700 (MST) Cc: terry@lambert.org, freebsd-hackers@FreeBSD.org In-Reply-To: <199605090018.JAA17253@mail.tky007.tth.expo96.ad.jp> from "Masafumi NAKANE/=?ISO-2022-JP?B?GyRCQ2Y6LDJtSjgbKEI=?=" at May 9, 96 09:18: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 > > In line 220 of /src/bin/date/date.c: > > > > > > /* set the time */ > > if (nflag || netsettime(tval)) { > > logwtmp("|", "date", ""); > > tv.tv_sec = tval; > > tv.tv_usec = 0; > > if (settimeofday(&tv, (struct timezone *)NULL)) > > err(1, "settimeofday (timeval)"); > > ******** logwtmp("{", "date", ""); > > } > > > > It is clearly a '{'. > > > > This assumes you are using the standard "date" command to set your date. > > > > Check your date command dource code. > I've looked at this part of the source code quite a few times. > And I'm using standard date command. So far, I have been unsuccessful > to find out what is wrong. 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? If you specifically type "date 46" at 45 minutes after the hour (or whatever to force a log but no real skew), thet is the source of the entries? If you type "last | grep date | wc -l", and look at the number it prints out, you've *actuually* typed "date " that many times? (and why are you setting the date so often?). If you are, in fact, typing "date" each and every time, then we have to assume your binary is corrupt... do the following as root: 1) cd /usr/src/bin/date 2) make clean 3) make 4) make install And set the date again -- and see what you get. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.