Minor problem with 64bTT: monthly accounting figures

John-Mark Gurney gurney_j at efn.org
Mon Mar 1 13:19:59 PST 2004


Garance A Drosihn wrote this message on Mon, Mar 01, 2004 at 14:03 -0500:
> At 4:03 PM +0100 3/1/04, Maxime Henrion wrote:
> >Tillman Hodgson wrote:
> >> Look a little odd this month:
> >>
> >> Subject: caliban.rospa.ca monthly run output
> >>
> >> Doing login accounting:
> >>         root                 0.84
> >>         total            -298848.27
> >>         toor             -298849.12
> >>
> > > -- End of monthly output --
> 
> This would be from the output of the 'ac' command.  I tried
> this on my 64-bTT machine, and it seemed to be working OK.
> 
> >This is probably because the time is stored as a 32-bits integer
> >in /var/run/utmp and /var/log/wtmp.
> 
> If the time-value is defined as a fixed 32-bit integer (instead
> of being time_t), then the records themselves should be fine.  The
> records (as written) won't be changing in size due to this change.
> 
> So, if there is a bug here then it'll probably be in the 'ac'
> program.  That's my guess, at least.  We can look into that some
> more, but don't need to address it right away.

Could be that ac is assuming that sizeof(int32_t) == sizeof(time_t),
and so it casting a pointer to a time_t as a pointer to an int32_t...

This is usually the case....

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-sparc64 mailing list