summaryrefslogtreecommitdiffstats
path: root/gnu/usr.sbin
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-05-03 14:36:12 +0000
committerwpaul <wpaul@FreeBSD.org>1995-05-03 14:36:12 +0000
commit0c34ce41cd9383dcc16233ab2e583a0ac8641f79 (patch)
treec3c77b1ce93359ec43247b225fe0baf2b7a1f008 /gnu/usr.sbin
parentec1ff658ffff2a075eeafaf45985590a47f9fa14 (diff)
downloadFreeBSD-src-0c34ce41cd9383dcc16233ab2e583a0ac8641f79.zip
FreeBSD-src-0c34ce41cd9383dcc16233ab2e583a0ac8641f79.tar.gz
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.
Diffstat (limited to 'gnu/usr.sbin')
-rw-r--r--gnu/usr.sbin/ypserv/server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.sbin/ypserv/server.c b/gnu/usr.sbin/ypserv/server.c
index 9eb03cd..750bf91 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 <wpaul@ctr.columbia.edu>
**
-** $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;
OpenPOWER on IntegriCloud