*/
#define _GNU_SOURCE
+
#include <sys/types.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
#include <dlfcn.h>
-#include <stdio.h>
-#include <syslog.h>
#include <errno.h>
-#include <shadow.h>
#include <nss.h>
+#include <shadow.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
#include "nsswitch-internal.h"
#include "nonlocal.h"
int *errnop)
{
enum nss_status status;
+
+ char *nonlocal_ignore = getenv(NONLOCAL_IGNORE_ENV);
+ if (nonlocal_ignore != NULL && nonlocal_ignore[0] != '\0')
+ return NSS_STATUS_UNAVAIL;
+
if (spent_nip == NULL) {
status = _nss_nonlocal_setspent(0);
if (status != NSS_STATUS_SUCCESS)