summaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-12-17 12:01:20 +0100
committerFlorian Weimer <fweimer@redhat.com>2021-12-17 12:17:18 +0100
commitdc9b69d5331dcdca4547c0490cb9fefbd89e40f6 (patch)
treea1f506d552e15ef8cbf3b2185228feaaa2e29397 /manual
parent93aabf891e96e93f100081ee07989c23d7107d17 (diff)
downloadglibc-dc9b69d5331dcdca4547c0490cb9fefbd89e40f6.tar.gz
nss: Use "files dns" as the default for the hosts database (bug 28700)
This matches what is currently in nss/nsswitch.conf. The new ordering matches what most distributions use in their installed configuration files. It is common to add localhost to /etc/hosts because the name does not exist in the DNS, but is commonly used as a host name. With the built-in "dns [!UNAVAIL=return] files" default, dns is searched first and provides an answer for "localhost" (NXDOMAIN). We never look at the files database as a result, so the contents of /etc/hosts is ignored. This means that "getent hosts localhost" fail without a /etc/nsswitch.conf file, even though the host name is listed in /etc/hosts. Reviewed-by: Carlos O'Donell <carlos@redhat.com> (cherry picked from commit b99b0f93ee8762fe53ff65802deb6f00700b9924)
Diffstat (limited to 'manual')
-rw-r--r--manual/nss.texi5
1 files changed, 2 insertions, 3 deletions
diff --git a/manual/nss.texi b/manual/nss.texi
index 3aaa7786f8..524d22ad1e 100644
--- a/manual/nss.texi
+++ b/manual/nss.texi
@@ -324,9 +324,8 @@ missing.
@cindex default value, and NSS
For the @code{hosts} and @code{networks} databases the default value is
-@code{dns [!UNAVAIL=return] files}. I.e., the system is prepared for
-the DNS service not to be available but if it is available the answer it
-returns is definitive.
+@code{files dns}. I.e., local configuration will override the contents
+of the domain name system (DNS).
The @code{passwd}, @code{group}, and @code{shadow} databases was
traditionally handled in a special way. The appropriate files in the