Bug 378889

Summary: yast2 hostnames doesn't handle tabs in /etc/hosts correctly
Product: [openSUSE] openSUSE 10.3 Reporter: Andreas Stieger <Andreas.Stieger>
Component: YaST2Assignee: Katarina Machalkova <kmachalkova>
Status: RESOLVED DUPLICATE QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: openSUSE 11.0   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 382068    
Attachments: screenshot of incorrectly handled tab charactes when loaded into hostnames modules of yast2
y2log

Description Andreas Stieger 2008-04-10 18:39:29 UTC
Created attachment 207285 [details]
screenshot of incorrectly handled tab charactes when loaded into hostnames modules of yast2

/etc/hosts allows blanks and/or tabs as field separators, according to it's manpage. The YaST2 module Network / Hostnames can correctly handle tab as seperator between field 1 and 2:

sam:~ # tail -n 2 /etc/hosts
192.168.1.101   sam.local sam
192.168.1.105   murphy.local murphy
sam:~ # tail -n 2 /etc/hosts | hexdump -C
00000000  31 39 32 2e 31 36 38 2e  31 2e 31 30 31 09 73 61  |192.168.1.101.sa|
00000010  6d 2e 6c 6f 63 61 6c_20_ 73 61 6d 0a 31 39 32 2e  |m.local sam.192.|
00000020  31 36 38 2e 31 2e 31 30  35 09 6d 75 72 70 68 79  |168.1.105.murphy|
00000030  2e 6c 6f 63 61 6c_20_6d  75 72 70 68 79 0a        |.local murphy.|
0000003e

but not between hostname and alias, field 2 and 3:

sam:~ # tail -n 2 /etc/hosts
192.168.1.101   sam.local       sam
192.168.1.105   murphy.local    murphy
sam:~ # tail -n 2 /etc/hosts | hexdump -C
00000000  31 39 32 2e 31 36 38 2e  31 2e 31 30 31 09 73 61  |192.168.1.101.sa|
00000010  6d 2e 6c 6f 63 61 6c_09_ 73 61 6d 0a 31 39 32 2e  |m.local.sam.192.|
00000020  31 36 38 2e 31 2e 31 30  35 09 6d 75 72 70 68 79  |168.1.105.murphy|
00000030  2e 6c 6f 63 61 6c_09_6d  75 72 70 68 79 0a        |.local.murphy.|
0000003e

The names are not displayed correctly, see screenshot. The corresponding edit dialog is empty.
Comment 1 Andreas Stieger 2008-04-10 19:21:12 UTC
Created attachment 207290 [details]
y2log

logs...
Comment 2 Katarina Machalkova 2008-05-07 08:22:49 UTC

*** This bug has been marked as a duplicate of bug 382068 ***