summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nss_client/common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nss_client/common.c b/nss_client/common.c
index 01ca641e..a79dc660 100644
--- a/nss_client/common.c
+++ b/nss_client/common.c
@@ -570,6 +570,13 @@ enum nss_status sss_nss_make_request(enum sss_nss_command cmd,
int *errnop)
{
enum nss_status ret;
+ char *envval;
+
+ /* avoid looping in the nss daemon */
+ envval = getenv("_SSS_LOOPS");
+ if (envval && strcmp(envval, "NO") == 0) {
+ return NSS_STATUS_NOTFOUND;
+ }
ret = sss_nss_check_socket(errnop);
if (ret != NSS_STATUS_SUCCESS) {