Bug 24659

Summary: realhostname_sa does not call trimdomain for IPv4 addresses
Product: Base System Reporter: Jim.Pirzyk <Jim.Pirzyk>
Component: binAssignee: Brian Somers <brian>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Jim.Pirzyk 2001-01-26 20:40:01 UTC
	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.
Comment 1 Brian Somers freebsd_committer freebsd_triage 2001-01-26 21:35:28 UTC
Responsible Changed
From-To: freebsd-bugs->brian

I'll fix (apply?) this.
Comment 2 Brian Somers freebsd_committer freebsd_triage 2001-01-28 21:51:49 UTC
State Changed
From-To: open->closed

Fixed in -current.  I'll MFC in 2 weeks if there are no problems.