Bug 24659 - realhostname_sa does not call trimdomain for IPv4 addresses
Summary: realhostname_sa does not call trimdomain for IPv4 addresses
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Brian Somers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-01-26 20:40 UTC by Jim.Pirzyk
Modified: 2001-01-28 21:52 UTC (History)
0 users

See Also:


Attachments
file.diff (2.41 KB, patch)
2001-01-26 20:40 UTC, Jim.Pirzyk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.