We can fail in sasl_bind_send() with ERR_AUTH_FAILED for basically
unspecified reason but we do not failover to next server. This patch
should fix it.
As said on the meeting, I didn't reproduce it and I'm not sure if it
will fix the customer issue unless they confirm it, but it seems to be a
valid patch anyway.
From c9e3bf2726d9edba3cddc91c4ae98a87a5c1652a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com>
Date: Wed, 6 Apr 2016 13:20:59 +0200
Subject: [PATCH 1/2] Inform about (un)successful connection
---
src/providers/ldap/sdap_async_connection.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index f9074afb0c1340c7c2a50d4df0021eee4ae0d076..435cb1bb6864b516d386fafa360d062f780b5d04 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -2035,6 +2035,9 @@ int sdap_cli_connect_recv(struct tevent_req *req,
if (tevent_req_is_error(req, &tstate, &err)) {
/* mark the server as bad if connection failed */
if (state->srv) {
+ DEBUG(SSSDBG_OP_FAILURE, "Unable to establish connection "
+ "[%d]: %s\n", err, sss_strerror(err));
+
be_fo_set_port_status(state->be, state->service->name,
state->srv, PORT_NOT_WORKING);
} else {
@@ -2048,6 +2051,8 @@ int sdap_cli_connect_recv(struct tevent_req *req,
}
return EIO;
} else if (state->srv) {
+ DEBUG(SSSDBG_TRACE_FUNC, "Connection established.\n");
+
be_fo_set_port_status(state->be, state->service->name,
state->srv, PORT_WORKING);
}
--
2.1.0
From 8d6f024ac77ddb8dc87d7fd693cfe5846f3a88d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com>
Date: Wed, 6 Apr 2016 13:21:21 +0200
Subject: [PATCH 2/2] Failover to next server if authentication fails
---
src/providers/ldap/sdap_id_op.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/providers/ldap/sdap_id_op.c b/src/providers/ldap/sdap_id_op.c
index 6ad7e8188dc6211907cac88e90e4feff5080695c..3a3de3643711fc2e604b876f401a88b486f941d5 100644
--- a/src/providers/ldap/sdap_id_op.c
+++ b/src/providers/ldap/sdap_id_op.c
@@ -603,6 +603,7 @@ static void sdap_id_op_connect_done(struct tevent_req *subreq)
case EIO:
case EFAULT:
case ETIMEDOUT:
+ case ERR_AUTH_FAILED:
break;
default:
--
2.1.0
_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org