Bug 1047979 - getaddrinfo's canonocal name for entries from /etc/hosts is incorrect
Summary: getaddrinfo's canonocal name for entries from /etc/hosts is incorrect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 20
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Siddhesh Poyarekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1047983 1053443
TreeView+ depends on / blocked
 
Reported: 2014-01-02 19:46 UTC by Arjun Shankar
Modified: 2015-09-14 00:24 UTC (History)
7 users (show)

Fixed In Version: glibc-2.18-12.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1047983 1053443 (view as bug list)
Environment:
Last Closed: 2014-02-01 04:03:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
A reproducer (2.80 KB, application/x-shellscript)
2014-01-02 19:47 UTC, Arjun Shankar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Sourceware 16077 0 None None None Never

Description Arjun Shankar 2014-01-02 19:46:12 UTC
Description of problem:

    When getaddrinfo is called with hints.ai_flags |= AI_CANONNAME, and it finds a result from /etc/hosts, the 'canonical name' returned by it must be the value of the first name column in /etc/hosts.

    e.g. for the /etc/hosts line:
    "127.0.0.1    www.fubar.redhat    www", the canonical name is "www.fubar.redhat".

    Currently, this is not returned for AF_INET and AF_INET6 on Fedora 20.

Version-Release number of selected component (if applicable):
    glibc-2.18-11.fc20

How reproducible:
    Always


Steps to Reproduce:
    Run the attached reproducer

Actual results:
    test case reports 'fail'

Expected results:
    test case passes

Additional info:
    The test passes fine on Fedora 18.

Comment 1 Arjun Shankar 2014-01-02 19:47:34 UTC
Created attachment 844691 [details]
A reproducer

Comment 2 Fedora Update System 2014-01-30 10:14:55 UTC
glibc-2.18-12.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/glibc-2.18-12.fc20

Comment 3 Fedora Update System 2014-01-31 04:26:16 UTC
Package glibc-2.18-12.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.18-12.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-1830/glibc-2.18-12.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-02-01 04:03:31 UTC
glibc-2.18-12.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.