From eb59e992e145d2345878f6f516a5f11673911489 Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Sun, 30 Apr 2006 21:25:00 +0000 Subject: [PATCH] `cache' couldn't co-exist with `compat'. Submitted by: "Michael Bushkov" --- lib/libc/net/nsparser.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/net/nsparser.y b/lib/libc/net/nsparser.y index 4806dea84628..1f0fff1ad40c 100644 --- a/lib/libc/net/nsparser.y +++ b/lib/libc/net/nsparser.y @@ -157,10 +157,11 @@ _nsaddsrctomap(elem) lineno = _nsyylineno - (*_nsyytext == '\n' ? 1 : 0); if (curdbt.srclistsize > 0) { - if ((strcasecmp(elem, NSSRC_COMPAT) == 0) || + if (((strcasecmp(elem, NSSRC_COMPAT) == 0) && + (strcasecmp(curdbt.srclist[0].name, NSSRC_CACHE) != 0)) || (strcasecmp(curdbt.srclist[0].name, NSSRC_COMPAT) == 0)) { syslog(LOG_ERR, - "NSSWITCH(nsparser): %s line %d: 'compat' used with other sources", + "NSSWITCH(nsparser): %s line %d: 'compat' used with sources, other than 'cache'", _PATH_NS_CONF, lineno); return; }