All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlos O'Donell" <carlos-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: "linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Michael Kerrisk
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [patch] gethostbyname.3: NSS plugins searched first.
Date: Wed, 29 Apr 2015 13:24:51 -0400	[thread overview]
Message-ID: <554113E3.4040105@redhat.com> (raw)

The gethostbyname man page should first and foremost list that
the source of the data comes from the NSS plugins. I accept
that the man page is intentionally trying to be vague because
these things are not guaranteed anywhere, the truth is far
more mundane and "default" here IMO applies to a normal glibc
installation on Linux, and the fallback is always a localhost
nameserver.

I suggest the following changes, but feel free to reword as
you see fit.

Patch against master.

Signed-off-by: Carlos O'Donell <carlos-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

diff --git a/man3/gethostbyname.3 b/man3/gethostbyname.3
index 7875f88..59c7bb1 100644
--- a/man3/gethostbyname.3
+++ b/man3/gethostbyname.3
@@ -224,18 +224,20 @@ The domain name queries carried out by
 .BR gethostbyname ()
 and
 .BR gethostbyaddr ()
-use a combination of any or all of the name server
+use a combination of any or all of Name Service Switch
+.BR nsswitch.conf(5)
+configured sources, name servers in \fI/etc/resolv.conf\fP
+.BR resolv.conf(5),
+a local name server
 .BR named (8),
 a broken out line from \fI/etc/hosts\fP, and the Network
 Information Service (NIS or YP), depending upon the contents of the
 \fIorder\fP line in
 .IR /etc/host.conf .
-.\" (See
-.\" .BR resolv+ (8)).
-The default action is to query
-.BR named (8),
-followed by
-.IR /etc/hosts .
+The default action is to query the Name Service Switch
+.BR nsswitch.conf(5)
+configured sources, followed by a local name server
+.BR named (8).
 .PP
 The \fIhostent\fP structure is defined in \fI<netdb.h>\fP as follows:
 .sp
---

Cheers,
Carlos.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2015-04-29 17:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 17:24 Carlos O'Donell [this message]
     [not found] ` <554113E3.4040105-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-04-30  8:49   ` [patch] gethostbyname.3: NSS plugins searched first Michael Kerrisk (man-pages)
     [not found]     ` <5541ECAE.6080108-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-01  2:01       ` Carlos O'Donell
     [not found]         ` <5542DE76.7030201-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-04 20:14           ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554113E3.4040105@redhat.com \
    --to=carlos-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.