Bug 17066

Summary: pump and resolv.com
Product: [Retired] Red Hat Linux Reporter: Michael Stefaniuc <mstefani>
Component: pumpAssignee: Erik Troan <ewt>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: bero, mstefani
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-30 16:50:28 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 Michael Stefaniuc 2000-08-29 10:50:18 UTC
pump leaves the "search" entry in /etc/resolv.conf empty (tested on 7.0
gold,  pump-0.8.3-2).
On a 6.1 and a 6.2 the search entry was set to the "option domain-name"
from the dhcpd.

Comment 1 Michael Stefaniuc 2000-08-30 16:19:43 UTC
If the domain-name contains only one "." and the toplevel domain isn't one of
com, edu, gov, mil, org, net, int, then the "search" entry in resolv.conf is
empty.
Hier is the patch:
--- ./pump.c.search     Wed Aug 30 17:59:02 2000
+++ ./pump.c    Wed Aug 30 18:03:02 2000
@@ -164,8 +164,8 @@
     } else if (domain && !strchr(domain, '.')) {
        fprintf(f, "search %s\n", domain);
     } else if (domain) {
-       fprintf(f, "search");
-       chptr = domain;
+       fprintf(f, "search %s", domain);
+       chptr = strchr(domain, '.');
        do {
            /* If there is a single . in the search path, write it out
             * only if the toplevel domain is com, edu, gov, mil, org,

Comment 2 Bernhard Rosenkraenzer 2000-08-30 16:37:44 UTC
I've fixed this (but a bit differently) in CVS [check the comment in the code].

Leaving the bug open because whatever this behavior was supposed to accomplish
(if anything) is gone now.

Comment 3 Bernhard Rosenkraenzer 2000-08-30 16:50:26 UTC
0.8.4 (with my change) built in dist-7.1

Comment 4 Erik Troan 2000-08-30 17:45:06 UTC
A similiar change is already in recent versions of pump (including that in
guinness)