From 85db4f8301457f15d382a0da20b82d4a02d31a06 Mon Sep 17 00:00:00 2001 From: wpaul Date: Mon, 10 Aug 1998 19:43:33 +0000 Subject: DNS lookups for partially qualified hosts didn't work right. I was trying to be clever by avoiding the 'check all domains in the search list' cycle in certain cases, but this would lose if handed a name like "foo.ctr" which refers to an FQDN of "foo.ctr.columbia.edu". If "columbia.edu" is in the search list in /etc/resolv.conf then the DNS lookup code should resolve it, but it didn't. --- usr.sbin/ypserv/yp_dnslookup.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'usr.sbin/ypserv') diff --git a/usr.sbin/ypserv/yp_dnslookup.c b/usr.sbin/ypserv/yp_dnslookup.c index 3ed3274..1c334a8 100644 --- a/usr.sbin/ypserv/yp_dnslookup.c +++ b/usr.sbin/ypserv/yp_dnslookup.c @@ -32,7 +32,7 @@ #ifndef lint static const char rcsid[] = - "$Id: yp_dnslookup.c,v 1.13 1997/10/29 07:25:02 charnier Exp $"; + "$Id: yp_dnslookup.c,v 1.14 1998/06/09 05:06:27 imp Exp $"; #endif /* not lint */ /* @@ -456,10 +456,7 @@ ypstat yp_async_lookup_name(rqstp, name) if (q->prot_type == SOCK_DGRAM) q->xid = svcudp_get_xid(q->xprt); q->client_addr = q->xprt->xp_raddr; - if (!strchr(name, '.')) - q->domain = _res.dnsrch; - else - q->domain = NULL; + q->domain = _res.dnsrch; q->id = yp_send_dns_query(name, q->type); if (q->id == 0) { -- cgit v1.1