[illumos-Developer] DHCP, DNS domains and search lists in /etc/resolv.conf

Hans Rosenfeld rosenfeld at grumpf.hope-2000.org
Fri Jul 22 07:19:34 PDT 2011


Hi,

On Fri, Jul 22, 2011 at 09:13:04AM -0400, Gordon Ross wrote:
> While it may be true that resolv.conf domain and search lines are equivalent,
> other consumers of this information (i.e. CIFS) might care to know what was
> actually given as the domain by the DHCP server.

If it is ok for a program to read /etc/resolv.conf itself, it would be
reasonable to assume that it has to parse it using the documented
semantics. That is, the program parses /etc/resolv.conf in the same way
as the resolver does. The resolver always uses the first domain name in
the search list as the default domain.

But somehow I doubt that it is wise to do this. I think the resolver
should always be used to query that information.

> How hard is it to write the first name as domain, and additional names
> in search?

It wouldn't be hard at all, but it would be wrong. If you wanted to do
that correctly, you would write the first domain name as domain, and all
domain names including the first one in search.


Hans

-- 
%SYSTEM-F-ANARCHISM, The operating system has been overthrown



More information about the Developer mailing list