Bug 69320

Summary: malformed /etc/hosts causes unhandled exception
Product: [Retired] Red Hat Linux Reporter: filos2
Component: redhat-config-networkAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: dynode
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-07-24 16:21:04 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 filos2 2002-07-20 22:47:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (X11; U; Linux 2.4.18-5 i686)

Description of problem:
Here's the 2 line /etc/hosts file containing an error:

127.0.0.1               localhost.localdomain localhost
mymachine.ab.hsia.telus.net

Traceback (innermost last):
  File "/usr/sbin/internet-druid", line 1400, in ?
    window = mainDialog('druid')
  File "/usr/sbin/internet-druid", line 222, in __init__
    self.load()
  File "/usr/sbin/internet-druid", line 243, in load
    self.loadProfiles()
  File "/usr/sbin/internet-druid", line 256, in loadProfiles
    profilelist = getProfileList()
  File "/usr/sbin/../share/redhat-config-network/netconfpkg/NCProfileList.py",
line 393, in getProfileList
    PFList.load()
  File "/usr/sbin/../share/redhat-config-network/netconfpkg/NCProfileList.py",
line 44, in load
    hoconf = Conf.ConfEHosts()
  File "/usr/sbin/../share/redhat-config-network/netconfpkg/Conf.py", line 429,
in __init__
    Conf.__init__(self, '/etc/hosts')
  File "/usr/sbin/../share/redhat-config-network/netconfpkg/Conf.py", line 180,
in __init__
    self.read()
  File "/usr/sbin/../share/redhat-config-network/netconfpkg/Conf.py", line 432,
in read
    self.initvars()
  File "/usr/sbin/../share/redhat-config-network/netconfpkg/Conf.py", line 445,
in initvars
    raise BadFile, 'Malformed /etc/hosts file'
Conf.BadFile: Malformed /etc/hosts file



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. run Network Configuration WIzard from Gnome "System Settings" window
2.
3.
	

Additional info:

Comment 1 Harald Hoyer 2002-07-22 13:05:18 UTC
fixed in rhpl-CVS file Conf.py, thx

Comment 2 Trond Eivind Glomsrxd 2002-07-24 16:21:00 UTC
It will also print out a message on the commandline about the file being invalid.

Comment 3 Trond Eivind Glomsrxd 2002-07-31 00:12:19 UTC
Fixed in 1.1.13-1 - the fix in RHPL is not sufficent.

Comment 4 Harald Hoyer 2002-10-18 15:10:57 UTC
*** Bug 71114 has been marked as a duplicate of this bug. ***

Comment 5 Harald Hoyer 2002-10-18 15:11:11 UTC
*** Bug 76211 has been marked as a duplicate of this bug. ***

Comment 6 Russell 2003-03-23 21:59:44 UTC
*** Bug 86475 has been marked as a duplicate of this bug. ***