From e51f148aa1040a89485a3c740410108a56db4144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Aulery?= Date: Tue, 10 Mar 2015 00:27:28 +0100 Subject: [PATCH] host.conf.5: Rework discussion of nospoof, spoofalert, spoof and RESOLV_SPOOF_CHECK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The keywords and environment variables "nospoof", "spoofalert", "spoof" and RESOLV_SPOOF_CHECK were added to glibc 2.0.7 but never implemented Move descriptions to historical section and reorder it for clarity See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773443 Reported-by: by: Stéphane Aulery Signed-off-by: Michael Kerrisk --- man5/host.conf.5 | 161 ++++++++++++++++++++++++----------------------- 1 file changed, 81 insertions(+), 80 deletions(-) diff --git a/man5/host.conf.5 b/man5/host.conf.5 index 9ff2ed304..08da43520 100644 --- a/man5/host.conf.5 +++ b/man5/host.conf.5 @@ -66,6 +66,87 @@ This is by default, as it may cause a substantial performance loss at sites with large hosts files. .TP +.I reorder +Valid values are +.IR on " and " off . +If set to +.IR on , +resolv+ will attempt to reorder host addresses so that local addresses +(i.e., on the same subnet) are listed first when a +.BR gethostbyname (3) +is performed. +Reordering is done for all lookup methods. +The default value is +.IR off . +.SH ENVIRONMENT +The following environment variables can be used to allow users to +override the behavior which is configured in +.IR /etc/host.conf : +.TP +.B RESOLV_HOST_CONF +If set, this variable points to a file that should be read instead of +.IR /etc/host.conf . +.TP +.B RESOLV_MULTI +Overrides the +.I multi +command. +.TP +.B RESOLV_REORDER +Overrides the +.I reorder +command. +.TP +.B RESOLV_ADD_TRIM_DOMAINS +A list of domains, separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or +commas (\(aq,\(aq), with the leading dot, which will be added to the list of +domains that should be trimmed. +.TP +.B RESOLV_OVERRIDE_TRIM_DOMAINS +A list of domains, separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or +commas (\(aq,\(aq), with the leading dot, which will replace the list of +domains that should be trimmed. +Overrides the +.I trim +command. +.SH FILES +.TP +.I /etc/host.conf +Resolver configuration file +.TP +.I /etc/resolv.conf +Resolver configuration file +.TP +.I /etc/hosts +Local hosts database +.SH NOTES +The following differences exist compared to the original implementation. +A new command +.I spoof +and a new environment variable +.B RESOLV_SPOOF_CHECK +can take arguments like +.IR off ", " nowarn " and " warn . +Line comments can appear anywhere and not only at the beginning of a line. +.SS Historical +The +.BR nsswitch.conf (5) +file is the modern way of controlling the order of host lookups. +.PP +In glibc 2.4 and earlier, the following keyword is recognized: +.TP +.I order +This keyword specifies how host lookups are to be performed. +It should be followed by one or more lookup methods, separated by commas. +Valid methods are +.IR bind ", " hosts ", and " nis . +.TP +.B RESOLV_SERV_ORDER +Overrides the order command. +.PP +Since glibc 2.0.7, the following keywords and environment variable have +been recognized but never implemented: +.TP .I nospoof Valid values are .IR on " and " off . @@ -112,27 +193,6 @@ enhance the security but not emit warnings via the syslog facility. Setting this option to anything else is equal to setting it to .IR nowarn . .TP -.I reorder -Valid values are -.IR on " and " off . -If set to -.IR on , -resolv+ will attempt to reorder host addresses so that local addresses -(i.e., on the same subnet) are listed first when a -.BR gethostbyname (3) -is performed. -Reordering is done for all lookup methods. -The default value is -.IR off . -.SH ENVIRONMENT -The following environment variables can be used to allow users to -override the behavior which is configured in -.IR /etc/host.conf : -.TP -.B RESOLV_HOST_CONF -If set, this variable points to a file that should be read instead of -.IR /etc/host.conf . -.TP .B RESOLV_SPOOF_CHECK Overrides the .IR nospoof ", " spoofalert " and " spoof @@ -141,65 +201,6 @@ commands in the same way as the command is parsed. Valid values are .IR off ", " nowarn " and " warn . -.TP -.B RESOLV_MULTI -Overrides the -.I multi -command. -.TP -.B RESOLV_REORDER -Overrides the -.I reorder -command. -.TP -.B RESOLV_ADD_TRIM_DOMAINS -A list of domains, separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or -commas (\(aq,\(aq), with the leading dot, which will be added to the list of -domains that should be trimmed. -.TP -.B RESOLV_OVERRIDE_TRIM_DOMAINS -A list of domains, separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or -commas (\(aq,\(aq), with the leading dot, which will replace the list of -domains that should be trimmed. -Overrides the -.I trim -command. -.SH FILES -.TP -.I /etc/host.conf -Resolver configuration file -.TP -.I /etc/resolv.conf -Resolver configuration file -.TP -.I /etc/hosts -Local hosts database -.SH NOTES -The following differences exist compared to the original implementation. -A new command -.I spoof -and a new environment variable -.B RESOLV_SPOOF_CHECK -can take arguments like -.IR off ", " nowarn " and " warn . -Line comments can appear anywhere and not only at the beginning of a line. -.SS Historical -In glibc 2.4 and earlier, the following keyword is recognized: -.TP -.I order -This keyword specifies how host lookups are to be performed. -It should be followed by one or more lookup methods, separated by commas. -Valid methods are -.IR bind ", " hosts ", and " nis . -The -.B RESOLV_SERV_ORDER -environment variable could be used to override the -.I order -command. -.PP -The -.BR nsswitch.conf (5) -file is the modern way of controlling the order of host lookups. .SH SEE ALSO .BR gethostbyname (3), .BR hosts (5),