1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

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.
This commit is contained in:
Bill Paul 1995-05-03 14:36:12 +00:00
parent d62eae9c12
commit 8a17ad7e57
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8237

View File

@ -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;