Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 1996 18:11:29 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        max@sfc.wide.ad.jp
Cc:        terry@lambert.org, freebsd-hackers@FreeBSD.org
Subject:   Re: date change and wtmp record
Message-ID:  <199605090111.SAA27469@phaeton.artisoft.com>
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

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 <some 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605090111.SAA27469>