in the realhostname_sa routine (libutil), if the hostname of the remote system is > 16 characters long, the IP number is stored in the wtmp file. This happens even for hosts that are in the same DNS Domain. Conversely, in the login program, which does not call realhostname_sa, it trims the hostname before writing the hostname into the file. realhostname_sa is called by sshd. How-To-Repeat: Login to a remote FreeBSD host from a host that has a long hostname. First login with rsh, then do a finger -sh, it should show a short hostname for 'Where'. Then login via ssh, do the finger -sh and it will show the IP number instead.
Responsible Changed From-To: freebsd-bugs->brian I'll fix (apply?) this.
State Changed From-To: open->closed Fixed in -current. I'll MFC in 2 weeks if there are no problems.