From ccd17380f5347d0c50fe5214de2e2cd077238f53 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 8 Jan 2009 10:45:18 -0500 Subject: Add support to avoid loops in SSSD daemons. Any request to the sss client is immediately returned back to avoi sssd_nss trying to call itsels again and again. --- nss_client/common.c | 7 +++++++ 1 file changed, 7 insertions(+) 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) { -- cgit