Blob Blame History Raw
From d170e144a1ae702ba55c508599ffbda4e95919e5 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Wed, 2 Sep 2015 13:40:48 +0200
Subject: [PATCH 76/87] SDAP: Do not set is_offline if ignore_mark_offline is
 set
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Required for:
https://fedorahosted.org/sssd/ticket/2637

The caller of the sdap_id_op requests can set the ignore_mark_offline
flag to avoid the sdap_id_op from marking the whole back end as offline.

However, there was a small bug - the is_offline internal sdap_id_op flag
was still being set. As a consequence, the error code from the
connection was ignored and EAGAIN was always returned.

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
(cherry picked from commit 0561d532cf76b035b73cfed929a6896071dac407)
---
 src/providers/ldap/sdap_id_op.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/providers/ldap/sdap_id_op.c b/src/providers/ldap/sdap_id_op.c
index 508bbd2ad3ebb3f9159a8b7f48258ff31a7cd6e2..0474a9cb7828ef43ef76cf6bebac077315296875 100644
--- a/src/providers/ldap/sdap_id_op.c
+++ b/src/providers/ldap/sdap_id_op.c
@@ -567,9 +567,9 @@ static void sdap_id_op_connect_done(struct tevent_req *subreq)
             DEBUG(SSSDBG_CRIT_FAILURE,
                   "Failed to connect, going offline (%d [%s])\n",
                    ret, strerror(ret));
+            is_offline = true;
             be_mark_offline(conn_cache->id_conn->id_ctx->be);
         }
-        is_offline = true;
     }
 
     if (ret == EOK) {
-- 
2.4.3