Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#20524 - [glibc] gethostbyname() cant resolve names starting/ending with "-"

Attached to Project: Arch Linux
Opened by Thomas Dy (stoichyu) - Thursday, 19 August 2010, 19:57 GMT
Last edited by Allan McRae (Allan) - Saturday, 11 September 2010, 04:54 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
This bug is the same as https://bugs.launchpad.net/glibc/+bug/144431

The gist of it is that domain names starting or ending with a "-" do not resolve but they are do resolve in Windows and Mac OS X. An example given in the other bug report is "-kol.deviantart.com"

Upstream does not seem to want to fix it from what I gathered in the other bug report. The fix was relatively easy, though. I just followed comment #9's instructions and everything seems ok. I have attached a patch file that fixes the problem.

Rant:
Strangely, in the README file, they admit to allow underscores in domain names which I haven't seen at all. So I don't see why they can't just allow hyphens.
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 11 September 2010, 04:54 GMT
Reason for closing:  Upstream
Additional comments about closing:  Waiting on upstream decision
Comment by Allan McRae (Allan) - Thursday, 19 August 2010, 23:48 GMT
Upstream bug report for reference: http://sourceware.org/bugzilla/show_bug.cgi?id=4671

Drepper's comment will prevent me from applying this patch until there is some upstream agreement:
"Plus, this could have unwanted effects. If somebody makes a mistake when specifying a host name a parameter might be mistaken for it. This might even be exploitable."
Comment by Thomas Dy (stoichyu) - Friday, 20 August 2010, 05:38 GMT
I actually find that argument invalid since nslookup actually does resolve domain names with a - at the beginning or end even without the patch. It's only in browsers where it says "the address is not found" or something of the like.

Anyway, is getting upstream to fix this the only way this will ever be patched?
Comment by Allan McRae (Allan) - Friday, 20 August 2010, 08:10 GMT
If the upstream developer says that adding a feature might result in an exploit, I am not adding a patch until it is decided otherwise.

Also, it is Arch policy to never apply patches rejected by upstream. See the final point here: http://wiki.archlinux.org/index.php/DeveloperWiki:Patching
Comment by Thomas Dy (stoichyu) - Friday, 20 August 2010, 09:22 GMT
Okay, thank you for your time on this issue.

Loading...