Bug 820 - utmp seems to be getting clobbered on logins
Summary: utmp seems to be getting clobbered on logins
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 3.8p1
Hardware: All IRIX
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks: 821
  Show dependency treegraph
 
Reported: 2004-03-30 03:07 AEST by Kevin Taylor
Modified: 2004-04-19 23:32 AEST (History)
0 users

See Also:


Attachments
Don't use updwtmpx on IRIX (1.68 KB, patch)
2004-04-04 22:29 AEST, Darren Tucker
djm: ok+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Taylor 2004-03-30 03:07:14 AEST
[-hostname-]/usr/people/ktaylor>last -3
ktaylor  ttyq2        host.someplace.org    Mon Mar 29 12:04   still logged in

The is the information I expect to see.

Then, I open a second window:

[-hostname-]/usr/people/ktaylor>last -3
ktaylor  ttyq3        host.someplace.org    Mon Mar 29 12:04   still logged in
ktaylor  ttyq3                              Mon Mar 29 12:04 - 12:04  (00:00)
ktaylor  ttyq2                              Mon Mar 29 12:04   still logged in

So, the first connection has had its 'from' information removed, then another
login happens and logs right out (perhaps this is privilege separation), then
the actual second login session occurs with the proper information.

On logout, that 'from' info is again wiped from utmp.

This is an IRIX box running 6.5.22 and openssh-3.8p1
Comment 1 Darren Tucker 2004-03-30 10:01:22 AEST
Is this related to bug #378?  Does IRIX have updwtmpx, and if so is it detected
by configure (check for HAVE_UPDWTMPX in config.h)?
Comment 2 Darren Tucker 2004-03-30 11:38:11 AEST
Consider this one for 3.8.1p1 (if we can figure out how to fix it).
Comment 3 Kevin Taylor 2004-03-30 21:25:27 AEST
We're not using UseLogin because of issues we've had in the past, so I won't say
it's exactly like the other bug.

I can say that it did work in 3.6.1, but that's a lot of changes from v3.8.

config.h:#define HAVE_UPDWTMPX 1
config.h.in:#undef HAVE_UPDWTMPX
config.log:#define HAVE_UPDWTMPX 1

Looks like updwtmpx was found.

This could be completely unrelated, but something I'll mention. IRIX has been
having some issues with ipv6 support. It was an issue in irix 6.5.18, but may
have been 'fixed' in irix 6.5.22. It's been known to cause weird issues with
stuff like ftp sessions generating weird errors, etc. I wouldn't think it is
related to this, but you never know. The only option related to ipv6 I can see
is the 4in6 option, so there's nothing else I can disable.

Comment 4 Darren Tucker 2004-03-30 21:36:25 AEST
Try commenting out the "#define HAVE_UPDWTMPX 1" line in config.h and recompile,
this will disable its use (and thus behave more like previous versions).

Also, if you put "#define BROKEN_GETADDRINFO 1" into config.h and recompile it
will disable the IPv6 support.  It would be interesting to see if that makes a
difference here if the above doesn't.
Comment 5 Kevin Taylor 2004-03-30 22:09:55 AEST
Ok. So far so good. The first change you recommended seems to work better. We
now get proper looking records. Unfortunately this one machine is extremely low
usage, so we'll have to wait to see how it handles under higher load. It also
seemed to fix the issue of that 'extra' login record that I thought may have
been the privilege separation.

FYI, I had these notes from our build of 3.6.1:

  * Due to VerifyReverseMapping option causing sshd core dumps, these
    changes need to be made also (for IRIX):
    *** NOTE: this was fixed as of 6.5.20+ [not tested yet though] ***

  Edit $SRC/config.h

  change:

    /* #undef BROKEN_GETADDRINFO */
    to
    #define BROKEN_GETADDRINFO
  and 
    #define HAVE_GETADDRINFO 1
    to
    /* #define HAVE_GETADDRINFO 1 */ 

We won't know if sgi actually fixed this issue until we run it on a higher usage
box than the one we have this running on right now. 

Thanks for your help.

You can close the bug. If it happens again, I'll just open a new bug and refer
back. Hopefully this fix will still work on a higher usage system. I don't see
why it wouldn't.

Comment 6 Darren Tucker 2004-03-30 22:24:43 AEST
OK, so it looks like updwtmpx doesn't work right on IRIX for some reason.  Any
suggestions for what to do with it?  (Maybe add a BROKEN_UPDWTMPX and enable it
for IRIX?)

BTW, if anyone else is looking for it the IRIX VerifyReverseMapping stuff is bug
#585 (also from Kevin).
Comment 7 Darren Tucker 2004-04-04 22:29:13 AEST
Created attachment 593 [details]
Don't use updwtmpx on IRIX

Please try this patch (apply to a recent snapshot).  You'll need to to run
"autoconf" after applying the patch.
Comment 8 Damien Miller 2004-04-06 20:07:03 AEST
Comment on attachment 593 [details]
Don't use updwtmpx on IRIX

looks ok to me
Comment 9 Darren Tucker 2004-04-06 21:34:59 AEST
Patch applied, thanks for the report.  The fix will be in tomorrow's snapshot.
Comment 10 Damien Miller 2004-04-19 23:32:00 AEST
Closed with release of portable OpenSSH 3.8.1p1