Linux-man Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] resolv.conf(5): Attempt clarify domain/search interaction
@ 2019-11-07 12:05 Florian Weimer
  2019-11-07 12:22 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2019-11-07 12:05 UTC (permalink / raw)
  To: linux-man

The domain directive is historic at this point; it should not be used.
---
 man5/resolv.conf.5 | 41 ++++++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 21 deletions(-)

diff --git a/man5/resolv.conf.5 b/man5/resolv.conf.5
index 49a8eed4c..2ffe973a1 100644
--- a/man5/resolv.conf.5
+++ b/man5/resolv.conf.5
@@ -39,10 +39,9 @@ The configuration file is considered a trusted source of DNS information
 (e.g., DNSSEC AD-bit information will be returned unmodified from this
 source).
 .PP
-If this file does not exist,
-only the name server on the local machine will be queried;
-the domain name is determined from the hostname
-and the domain search path is constructed from the domain name.
+If this file does not exist, only the name server on the local machine
+will be queried, and the search list contains the local domain name
+determined from the hostname.
 .PP
 The different configuration options are:
 .TP
@@ -63,20 +62,14 @@ try the next, until out of name servers,
 then repeat trying all the name servers
 until a maximum number of retries are made.)
 .TP
-\fBdomain\fP Local domain name.
-Most queries for names within this domain can use short names
-relative to the local domain.
-If set to \(aq.\(aq, the root domain is considered.
-If no \fBdomain\fP entry is present, the domain is determined
-from the local hostname returned by
-.BR gethostname (2);
-the domain part is taken to be everything after the first \(aq.\(aq.
-Finally, if the hostname does not contain a domain part, the root
-domain is assumed.
-.TP
 \fBsearch\fP Search list for host-name lookup.
-The search list is normally determined from the local domain name;
-by default, it contains only the local domain name.
+By default, the search list contains one entry, the local domain name.
+It is determined from the local hostname returned by
+.BR gethostname (2);
+the local domain name is taken to be everything after the first
+\(aq.\(aq.  Finally, if the hostname does not contain a \(aq.\(aq, the
+root domain is assumed as the local domain name.
+.IP
 This may be changed by listing the desired domain search path
 following the \fIsearch\fP keyword with spaces or tabs separating
 the names.
@@ -104,11 +97,21 @@ traffic if the servers for the listed domains are not local,
 and that queries will time out if no server is available
 for one of the domains.
 .IP
+If there are multiple
+.B search
+directives, only the search list from the last instance is used.
+.IP
 In glibc 2.25 and earlier, the search list is limited to six domains
 with a total of 256 characters.
 Since glibc 2.26,
 .\" glibc commit 3f853f22c87f0b671c0366eb290919719fa56c0e
 the search list is unlimited.
+.IP
+The
+.B domain
+directive is an obsolete name for the
+.B search
+directive that handles one search list entry only.
 .TP
 \fBsortlist\fP
 This option allows addresses returned by
@@ -315,10 +318,6 @@ in
 This option disables automatic reloading of a changed configuration file.
 .RE
 .PP
-The \fIdomain\fP and \fIsearch\fP keywords are mutually exclusive.
-If more than one instance of these keywords is present,
-the last instance wins.
-.PP
 The \fIsearch\fP keyword of a system's \fIresolv.conf\fP file can be
 overridden on a per-process basis by setting the environment variable
 .B LOCALDOMAIN
-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] resolv.conf(5): Attempt clarify domain/search interaction
  2019-11-07 12:05 [PATCH] resolv.conf(5): Attempt clarify domain/search interaction Florian Weimer
@ 2019-11-07 12:22 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2019-11-07 12:22 UTC (permalink / raw)
  To: Florian Weimer, linux-man; +Cc: mtk.manpages

Hello Florian,

On 11/7/19 1:05 PM, Florian Weimer wrote:
> The domain directive is historic at this point; it should not be used.

Thanks! Patch applied.

Cheers,

Michael

> ---
>  man5/resolv.conf.5 | 41 ++++++++++++++++++++---------------------
>  1 file changed, 20 insertions(+), 21 deletions(-)
> 
> diff --git a/man5/resolv.conf.5 b/man5/resolv.conf.5
> index 49a8eed4c..2ffe973a1 100644
> --- a/man5/resolv.conf.5
> +++ b/man5/resolv.conf.5
> @@ -39,10 +39,9 @@ The configuration file is considered a trusted source of DNS information
>  (e.g., DNSSEC AD-bit information will be returned unmodified from this
>  source).
>  .PP
> -If this file does not exist,
> -only the name server on the local machine will be queried;
> -the domain name is determined from the hostname
> -and the domain search path is constructed from the domain name.
> +If this file does not exist, only the name server on the local machine
> +will be queried, and the search list contains the local domain name
> +determined from the hostname.
>  .PP
>  The different configuration options are:
>  .TP
> @@ -63,20 +62,14 @@ try the next, until out of name servers,
>  then repeat trying all the name servers
>  until a maximum number of retries are made.)
>  .TP
> -\fBdomain\fP Local domain name.
> -Most queries for names within this domain can use short names
> -relative to the local domain.
> -If set to \(aq.\(aq, the root domain is considered.
> -If no \fBdomain\fP entry is present, the domain is determined
> -from the local hostname returned by
> -.BR gethostname (2);
> -the domain part is taken to be everything after the first \(aq.\(aq.
> -Finally, if the hostname does not contain a domain part, the root
> -domain is assumed.
> -.TP
>  \fBsearch\fP Search list for host-name lookup.
> -The search list is normally determined from the local domain name;
> -by default, it contains only the local domain name.
> +By default, the search list contains one entry, the local domain name.
> +It is determined from the local hostname returned by
> +.BR gethostname (2);
> +the local domain name is taken to be everything after the first
> +\(aq.\(aq.  Finally, if the hostname does not contain a \(aq.\(aq, the
> +root domain is assumed as the local domain name.
> +.IP
>  This may be changed by listing the desired domain search path
>  following the \fIsearch\fP keyword with spaces or tabs separating
>  the names.
> @@ -104,11 +97,21 @@ traffic if the servers for the listed domains are not local,
>  and that queries will time out if no server is available
>  for one of the domains.
>  .IP
> +If there are multiple
> +.B search
> +directives, only the search list from the last instance is used.
> +.IP
>  In glibc 2.25 and earlier, the search list is limited to six domains
>  with a total of 256 characters.
>  Since glibc 2.26,
>  .\" glibc commit 3f853f22c87f0b671c0366eb290919719fa56c0e
>  the search list is unlimited.
> +.IP
> +The
> +.B domain
> +directive is an obsolete name for the
> +.B search
> +directive that handles one search list entry only.
>  .TP
>  \fBsortlist\fP
>  This option allows addresses returned by
> @@ -315,10 +318,6 @@ in
>  This option disables automatic reloading of a changed configuration file.
>  .RE
>  .PP
> -The \fIdomain\fP and \fIsearch\fP keywords are mutually exclusive.
> -If more than one instance of these keywords is present,
> -the last instance wins.
> -.PP
>  The \fIsearch\fP keyword of a system's \fIresolv.conf\fP file can be
>  overridden on a per-process basis by setting the environment variable
>  .B LOCALDOMAIN
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07 12:05 [PATCH] resolv.conf(5): Attempt clarify domain/search interaction Florian Weimer
2019-11-07 12:22 ` Michael Kerrisk (man-pages)

Linux-man Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-man/0 linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ https://lore.kernel.org/linux-man \
		linux-man@vger.kernel.org
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-man


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git