From 8a17ad7e57646d4b240319b093dc70632a914a9d Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Wed, 3 May 1995 14:36:12 +0000 Subject: [PATCH] Small fix for yp_match implementation: In the case where ypserv is started with the -dns flag, fall through to the DNS lookup code only if asked to match a map with the word 'host' in its name. This prevents failed matches on non-host maps from being incorrectly handed off to DNS. --- gnu/usr.sbin/ypserv/server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/usr.sbin/ypserv/server.c b/gnu/usr.sbin/ypserv/server.c index 9eb03cdc8e77..750bf9144e80 100644 --- a/gnu/usr.sbin/ypserv/server.c +++ b/gnu/usr.sbin/ypserv/server.c @@ -24,7 +24,7 @@ ** Ported to FreeBSD and hacked all to pieces ** by Bill Paul ** -** $Id: server.c,v 1.3 1995/02/07 05:04:53 wpaul Exp $ +** $Id: server.c,v 1.4 1995/04/01 19:31:12 wpaul Exp $ ** */ @@ -528,7 +528,7 @@ ypresp_val *ypproc_match_2_svc(ypreq_key *key, ** XXX Perhaps this should be done in a sub-process for performance ** reasons. Later. */ - if (result.stat != YP_TRUE && dns_flag) + if (result.stat != YP_TRUE && strstr(key->map, "hosts") && dns_flag) { char *cp = NULL;