[Bug 345] w (uptime) command still indicates user is logged in after logout

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Jul 18 23:26:51 EST 2002


http://bugzilla.mindrot.org/show_bug.cgi?id=345





------- Additional Comments From Lutz.Jaenicke at aet.TU-Cottbus.DE  2002-07-18 23:26 -------
I "trace"ed a little bit:
* on login, both /etc/utmpx and /etc/utmp are updated with the login-
  information
* on logout, only /etc/utmpx is updated

who (=w) only reads /etc/utmp, so that it gets wrong login information.

This applies to today's CVS (2002/07/18).

As far as I have added debugging statements, utmpx_write_library() is called
for both login and logout. According to the manual page, pututxline()
should translate the utmpx entry into an utmp entry and also update
utmp accordingly. This only seems to happen for login, not for logout.

As far as I have looked over the code, I do not understand, why
utmpx_perform_logout() calls line_abbrevname() again (conditionally),
as the same code is also part of construct_utmpx(), isn't it?
Also utx.ut_type should have been set before unconditionally in
construct_utmpx().

So much for now. It seems that the rest is somewhere buried inside
pututxline() which does not provide too much diagnostics...

Oh, I just see, that in utmpx_perform_login(), there is called
utmpx_write_direct(li, &ut) for the case of !UTMPX_USE_LIBRARY
(note the "&ut" instead of "&utx", but it does not apply here anyway).





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the openssh-unix-dev mailing list