Bug 960

Summary: Support needed for NetBSD utmpx field ut_ss
Product: Portable OpenSSH Reporter: Ed Ravin <eravin>
Component: sshdAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: enhancement CC: djm
Priority: P2    
Version: 3.9p1   
Hardware: All   
OS: NetBSD   
Bug Depends on:    
Bug Blocks: 3162    
Attachments:
Description Flags
Use {w,u}tmpx on NetBSD instead of login(3) djm: ok+

Description Ed Ravin 2004-12-04 14:58:09 AEDT
NetBSD 2.0 has a new field in utmpx, ut_ss, for the IP address of the login 
client.  It would be nice if sshd could support this field.
Comment 1 Darren Tucker 2004-12-04 16:29:56 AEDT
OpenSSH doesn't use utmpx on NetBSD, it uses login(3).
Comment 2 Darren Tucker 2004-12-04 16:53:01 AEDT
Created attachment 746 [details]
Use {w,u}tmpx on NetBSD instead of login(3)

If you want to experiment, try this patch.  You will need to run "autoreconf"
to rebuild configure after applying the patch, then ./configure && make.

I make no guarantee that this is the right thing to do, however.
Comment 3 Ed Ravin 2004-12-04 17:38:18 AEDT
What about UseLogin in sshd.conf?  Also, I wanted sshd to create
both wtmp and wtmpx entries, so I compiled with both "-DUSE_WTMP"
and "-DUSE_WTMPX".

But this is still relevant: the NetBSD folks just added
an option to /usr/bin/login to support ut_ss: "-a <address>" so that login(3) 
can fill in ut_ss.  This is a post-NetBSD 2.0 patch.  One way to detect its
presence is by running "login -?" and parsing the usage message :-).
Comment 4 Damien Miller 2005-02-09 16:02:50 AEDT
Comment on attachment 746 [details]
Use {w,u}tmpx on NetBSD instead of login(3)

That looks OK to me
Comment 5 Darren Tucker 2005-02-09 20:25:09 AEDT
Thanks but I'm not keen to apply this until someone who knows NetBSD can confirm
that not using login(3) won't cause any other unpleasant side effects.  Any
NetBSD'ers lurking here want to comment?
Comment 6 Damien Miller 2020-08-05 09:00:34 AEST
Most of the patch has been applied - the remainder seems unnecessary.
Comment 7 Darren Tucker 2020-10-02 14:55:02 AEST
Mass close of all bugs fixed in 8.4 release.