X-Git-Url: http://andersk.mit.edu/gitweb/nss_nonlocal.git/blobdiff_plain/cbb0e3ea444ff761b58c8f9355af1dfc631bc64b..dc397f8f1c8609311eeb93210e190ecffdda5cf4:/nonlocal-shadow.c diff --git a/nonlocal-shadow.c b/nonlocal-shadow.c index ab8f442..bfc201c 100644 --- a/nonlocal-shadow.c +++ b/nonlocal-shadow.c @@ -23,17 +23,17 @@ */ #define _GNU_SOURCE + #include -#include -#include -#include -#include #include -#include -#include #include -#include #include +#include +#include +#include +#include +#include +#include #include "nsswitch-internal.h" #include "nonlocal.h" @@ -113,6 +113,11 @@ _nss_nonlocal_getspent_r(struct spwd *pwd, char *buffer, size_t buflen, 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)