From 17a28c1f02c5093b207a3b64201aa9e71df78eba Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 22 Aug 2000 17:02:49 +0000 Subject: [PATCH] 403. [bug] host did not use the search list. --- CHANGES | 2 ++ bin/dig/host.1 | 22 ++++++++++------------ bin/dig/host.c | 5 ++++- doc/man/bin/host.1 | 22 ++++++++++------------ 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/CHANGES b/CHANGES index 465c29c81d..b91809be8e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,6 @@ + 403. [bug] "host" did not use the search list. + 402. [bug] Treat undefined acls as errors, rather than warning and then later throwing an assertion. [RT #252] diff --git a/bin/dig/host.1 b/bin/dig/host.1 index d6724dc593..87c4190ff3 100644 --- a/bin/dig/host.1 +++ b/bin/dig/host.1 @@ -13,7 +13,7 @@ .\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION .\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: host.1,v 1.4 2000/08/15 20:11:54 gson Exp $ +.\" $Id: host.1,v 1.5 2000/08/22 17:02:49 gson Exp $ .\" .Dd Jun 30, 2000 .Dt HOST 1 @@ -114,19 +114,17 @@ The .Fl N option sets the number of dots that have to be in .Ar name -before the root name servers are queried for that name. -The default number of dots is zero. -Unlike previous versions of -.Nm host , -the BIND9 implementation does not append domain names from the -.Dv domain -or +for it to be considered absolute. The default value is that +defined using the ndots statement in +.Pa /etc/resolv.conf , +or 1 if no ndots statement is present. Names with fewer +dots are interpreted as relative names and will be searched +for in the domains listed in the .Dv search -directives in +or +.Dv domain +directive in .Pa /etc/resolv.conf . -Therefore -.Ar name -should be a fully-qualified domain name. .Pp The number of UDP retries for a lookup can be changed with the .Fl R diff --git a/bin/dig/host.c b/bin/dig/host.c index 574c638e9f..8ebee10f53 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: host.c,v 1.49 2000/08/22 16:44:46 gson Exp $ */ +/* $Id: host.c,v 1.50 2000/08/22 17:02:48 gson Exp $ */ #include #include @@ -50,6 +50,7 @@ extern unsigned int timeout; extern isc_mem_t *mctx; extern int ndots; extern int tries; +extern isc_boolean_t usesearch; extern int lookup_counter; extern char *progname; extern isc_task_t *global_task; @@ -673,6 +674,8 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) { } lookup->new_search = ISC_TRUE; ISC_LIST_APPEND(lookup_list, lookup, link); + + usesearch = ISC_TRUE; } int diff --git a/doc/man/bin/host.1 b/doc/man/bin/host.1 index d6724dc593..87c4190ff3 100644 --- a/doc/man/bin/host.1 +++ b/doc/man/bin/host.1 @@ -13,7 +13,7 @@ .\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION .\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: host.1,v 1.4 2000/08/15 20:11:54 gson Exp $ +.\" $Id: host.1,v 1.5 2000/08/22 17:02:49 gson Exp $ .\" .Dd Jun 30, 2000 .Dt HOST 1 @@ -114,19 +114,17 @@ The .Fl N option sets the number of dots that have to be in .Ar name -before the root name servers are queried for that name. -The default number of dots is zero. -Unlike previous versions of -.Nm host , -the BIND9 implementation does not append domain names from the -.Dv domain -or +for it to be considered absolute. The default value is that +defined using the ndots statement in +.Pa /etc/resolv.conf , +or 1 if no ndots statement is present. Names with fewer +dots are interpreted as relative names and will be searched +for in the domains listed in the .Dv search -directives in +or +.Dv domain +directive in .Pa /etc/resolv.conf . -Therefore -.Ar name -should be a fully-qualified domain name. .Pp The number of UDP retries for a lookup can be changed with the .Fl R