Bug 15522
Summary: | crash if dhcp server returns a domain with NO (0) dots in it | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <markal> |
Component: | pump | Assignee: | Erik Troan <ewt> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | bsmith3 |
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: | 2000-08-07 21:48:17 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
Need Real Name
2000-08-05 21:45:53 UTC
unrelated to this bug, but related to bug #15192: why isn't .net listed in this code fragment ? Bug #15192 is about pump writing an empty search line in /etc/resolv.conf when domain-name is my.net, but it works ok when domain-name is my.own.net... Why does pump even care what the top-level domain is? Shouldn't it just pass whatever the DHCP server says? Some organizations use bogus TLDs on their internal networks, and this might be problematic for them. Besides, there'll possibly be new TLDs on the internet soon, you don't want to be adding every single one into the code, do you? It's trying to know that it if a hostname is foo.bar.co.uk, the search path should be search bar.co.uk but if the hostname is foo.bar.oot.com, the search path should be search bar.oot.com oot.com unfortunately, there isn't a good rule to get this right (which is why dhcp servers should give us a proper search path rather then forcing us to use our own), so use /etc/pump.conf :-( diff -u -r1.52 pump.c --- pump.c 2000/08/07 21:48:22 1.52 This patch (which seems easier) is in pump-0.8.1 +++ pump.c 2000/08/07 21:49:38 @@ -161,6 +161,8 @@ if (domain && isSearchPath) { fprintf(f, "search %s\n", domain); + } else if (domain && !strchr(chptr, '.')) { + fprintf(f, "search %s\n", domain); } else if (domain) { fprintf(f, "search"); chptr = domain; |