summaryrefslogtreecommitdiff
path: root/nss_client
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2009-01-08 10:45:18 -0500
committerSimo Sorce <idra@samba.org>2009-01-08 10:45:18 -0500
commitccd17380f5347d0c50fe5214de2e2cd077238f53 (patch)
treed2a89e6316ed201677657f4389e7919eb2f3744d /nss_client
parent7122f66c144b1837e22adef519103cfd9808db62 (diff)
downloadsssd-ccd17380f5347d0c50fe5214de2e2cd077238f53.tar.gz
sssd-ccd17380f5347d0c50fe5214de2e2cd077238f53.tar.bz2
sssd-ccd17380f5347d0c50fe5214de2e2cd077238f53.zip
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.
Diffstat (limited to 'nss_client')
-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) {