]> andersk Git - nss_nonlocal.git/blobdiff - nonlocal-shadow.c
getspent: Pay attention to NSS_NONLOCAL_IGNORE
[nss_nonlocal.git] / nonlocal-shadow.c
index ab8f44258f6576711325bd3b39429981b7dea472..386230c9e41b3b282bea36ceee248d0861a361cf 100644 (file)
@@ -113,6 +113,11 @@ _nss_nonlocal_getspent_r(struct spwd *pwd, char *buffer, size_t buflen,
                         int *errnop)
 {
     enum nss_status status;
                         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)
     if (spent_nip == NULL) {
        status = _nss_nonlocal_setspent(0);
        if (status != NSS_STATUS_SUCCESS)
This page took 0.112407 seconds and 4 git commands to generate.