Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 1996 13:41:43 -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:  <199605092041.NAA29393@phaeton.artisoft.com>
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

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



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