index 15282bed81cf776ce03b357b07a8ef50b890a0b0..d025592a0473a101d9b05e929d91f64dba83e497 100644 (file)
*/
#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/stat.h>
#include <assert.h>
-#ifdef __ELF__
-#include <dlfcn.h>
-#endif /* __ELF__ */
-#include <fcntl.h>
-#define _NS_PRIVATE
+#include <errno.h>
#include <nsswitch.h>
#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <strings.h>
-#include <unistd.h>
static nss_method
-_nsmethod(const char *source, const char *database, const char *method,
+_nsmethod(const char *source, const char *database __unused, const char *method __unused,
const ns_dtab disp_tab[], void **cb_data)
{
int curdisp;
continue;
if (result & srclist[i].flags)
break;
+ /* Stop trying next resolver when there is a memory space fatal error. */
+ if ((result & NS_UNAVAIL) != 0 && errno == ENOSPC) {
+ break;
+ }
}
}
result &= NS_STATUSMASK; /* clear private flags in result */