1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Moved logging out of the nss_method_lookup() in order not to

flood logs with failed fallback method lookup attempts.
This commit is contained in:
Michael Bushkov 2007-12-17 16:12:57 +00:00
parent 9ed67737f2
commit 36736e35e8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174716

View File

@ -592,9 +592,7 @@ nss_method_lookup(const char *source, const char *database,
return (match->method);
}
}
if (is_dynamic())
nss_log(LOG_DEBUG, "%s, %s, %s, not found", source, database,
method);
*mdata = NULL;
return (NULL);
}
@ -701,12 +699,18 @@ _nsdispatch(void *retval, const ns_dtab disp_tab[], const char *database,
if (result & (srclist[i].flags))
break;
} else if (fb_method != NULL) {
fallback_dispatch = 1;
va_start(ap, defaults);
result = fb_method(retval, (void *)srclist[i].name, ap);
va_end(ap);
fallback_dispatch = 0;
} else {
if (fb_method != NULL) {
fallback_dispatch = 1;
va_start(ap, defaults);
result = fb_method(retval,
(void *)srclist[i].name, ap);
va_end(ap);
fallback_dispatch = 0;
} else
nss_log(LOG_DEBUG, "%s, %s, %s, not found, "
"and no fallback provided",
srclist[i].name, database, method_name);
}
}