If the backend goes offline, responder goes into an infinite loop while
looking up user information. This patch fixes it.
From edfb4651e1e48ad11a6b4f75bc1645e7ecf9ac1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <[email protected]>
Date: Thu, 26 Jan 2012 12:37:19 +0100
Subject: [PATCH] SUDO Integration - fix offline behaviour
---
src/responder/sudo/sudosrv_get_sudorules.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
index c53638a..cecede0 100644
--- a/src/responder/sudo/sudosrv_get_sudorules.c
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
@@ -133,8 +133,8 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
/* If cache miss and we haven't checked DP yet OR the entry is
* outdated, go to DP */
- if ((dctx->user->count == 0 && dctx->check_provider) ||
- cache_expire < time(NULL)) {
+ if ((dctx->user->count == 0 || cache_expire < time(NULL))
+ && dctx->check_provider) {
dpreq = sss_dp_get_account_send(cli_ctx, cli_ctx->rctx,
dom, false, SSS_DP_INITGROUPS,
cmd_ctx->username, 0, NULL);
--
1.7.6.5
_______________________________________________
sssd-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/sssd-devel