From: Anders Kaseorg Date: Fri, 9 Sep 2011 04:45:49 +0000 (-0400) Subject: getspent: Pay attention to NSS_NONLOCAL_IGNORE X-Git-Tag: 2.1~9 X-Git-Url: http://andersk.mit.edu/gitweb/nss_nonlocal.git/commitdiff_plain/9cd080be89db78f3172c062c5d95603a6b6964d7 getspent: Pay attention to NSS_NONLOCAL_IGNORE Signed-off-by: Anders Kaseorg --- diff --git a/nonlocal-shadow.c b/nonlocal-shadow.c index ab8f442..386230c 100644 --- a/nonlocal-shadow.c +++ b/nonlocal-shadow.c @@ -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)