Bug 117334

Summary: redhat-config-date enters IP address instead of host-name
Product: [Fedora] Fedora Reporter: Ambarish Sridharanarayanan <fedora>
Component: redhat-config-dateAssignee: Brent Fox <bfox>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: fedora, mitr
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-10 23:36:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ambarish Sridharanarayanan 2004-03-02 21:43:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET 
CLR 1.1.4322)

Description of problem:
redhat-config-date does a name lookup on the NTP server name entered 
and enters the IP address in /etc/ntp.conf instead of the hostname. 
This breaks setups where the name resolves randomly to multiple IP 
addresses to balance the server-load. (e.g. ntp.uiuc.edu resolves 
randomly to 3 time providers).


Version-Release number of selected component (if applicable):
redhat-config-date-1.5.25-1

How reproducible:
Always

Steps to Reproduce:
1. Launch redhat-config-date
2. Check "Enable Network Time Protocol"
3. Enter, say, ntp.uiuc.edu for "Server", and hit "OK"


Actual Results:  /etc/ntp.conf should now contain an entry "server 
<IP-address>"


Expected Results:  /etc/ntp.conf should have contained "server 
ntp.uiuc.edu" instead

Additional info:

Comment 1 Ambarish Sridharanarayanan 2004-03-02 22:21:31 UTC
Looks like redhat-config-date may also have to figure out the 
appropriate netmask for the "restrict" line from the list of IP 
addresses that the name resolves to.


Comment 2 Brent Fox 2004-03-10 23:36:10 UTC
Please see bug #70557 for an explanation of why we use the IP address
on the server line instead of the hostname.

Comment 3 Ambarish Sridharanarayanan 2004-03-11 04:41:10 UTC
If my understanding is correct, redhat-config-date does a DNS lookup
on the entered hostname since hostnames may be spoofed. I don't quite
understand the reasoning, considering that IP spoofing is also
possible. On a purely rhetorical note, why not enter the Hardware
addresses instead of the IP addresses?

Hostnames are supposed to provide a layer of abstraction over IP
addresses, and as such are commonly used for purposes such as load
balancing. Resolving breaks such applications. I'm not reopening the
bug, as I'm not entirely sure if entering hostnames is necessarily a
good thing either.