dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0077-AD-Only-ignore-errors-from-SDAP-lookups-if-there-s-a.patch

6cf099
From 4b9db04661f30625fb00bb22dc7ff84e77d2efb2 Mon Sep 17 00:00:00 2001
6cf099
From: Jakub Hrozek <jhrozek@redhat.com>
6cf099
Date: Wed, 2 Sep 2015 13:42:06 +0200
6cf099
Subject: [PATCH 77/87] AD: Only ignore errors from SDAP lookups if there's
6cf099
 another connection to fallback to
6cf099
MIME-Version: 1.0
6cf099
Content-Type: text/plain; charset=UTF-8
6cf099
Content-Transfer-Encoding: 8bit
6cf099
6cf099
Required for:
6cf099
https://fedorahosted.org/sssd/ticket/2637
6cf099
6cf099
The AD lookup code honors the ignore_mark_offline flag in the sense that
6cf099
if it's set, the sdap return code is not reported to the upper layer,
6cf099
but EOK is returned as request status and the sdap return code is
6cf099
returned separately.
6cf099
6cf099
This patch modifies the behaviour further to only apply if there is
6cf099
another connection to fall back to.
6cf099
6cf099
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
6cf099
(cherry picked from commit 7fc8692d49cdaa0368072f196433c07b475da679)
6cf099
---
6cf099
 src/providers/ad/ad_id.c | 1 +
6cf099
 1 file changed, 1 insertion(+)
6cf099
6cf099
diff --git a/src/providers/ad/ad_id.c b/src/providers/ad/ad_id.c
6cf099
index 7a0c6eccd2d2f0d4f8a545a9d4873a9447179a00..4f327f823173eb113153a556322dae4cc4b42f3e 100644
6cf099
--- a/src/providers/ad/ad_id.c
6cf099
+++ b/src/providers/ad/ad_id.c
6cf099
@@ -146,6 +146,7 @@ ad_handle_acct_info_done(struct tevent_req *subreq)
6cf099
 
6cf099
     ret = sdap_handle_acct_req_recv(subreq, &dp_error, &err, &sdap_err);
6cf099
     if (dp_error == DP_ERR_OFFLINE
6cf099
+        && state->conn[state->cindex+1] != NULL
6cf099
         && state->conn[state->cindex]->ignore_mark_offline) {
6cf099
          /* This is a special case: GC does not work.
6cf099
           *  We need to Fall back to ldap
6cf099
-- 
6cf099
2.4.3
6cf099