On 12/11/2012 03:58 PM, Jakub Hrozek wrote:
On Tue, Dec 11, 2012 at 03:53:25PM +0100, Jakub Hrozek wrote:
On Mon, Dec 10, 2012 at 12:35:29PM +0100, Pavel Březina wrote:
https://fedorahosted.org/sssd/ticket/1699
From 246cf7edc92ed2826cf8295787cfb4e78d28ffd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <[email protected]>
Date: Mon, 10 Dec 2012 12:23:25 +0100
Subject: [PATCH] let ldap_chpass_uri failover work when using same hostname
https://fedorahosted.org/sssd/ticket/1699
We want to continue with the next server on all errors, not only
on ETIMEDOUT.
I'm not quite sure, I think the intent was to only retry on
network-related errors and fail right away with fatal errors like
ENOMEM.
This particullar ticket was dealing with ECONNREFUSED.
Can you check where the ECONNREFUSED error came from? Maybe we're just
missing another special case for lret like the ones at the end of
sdap_sys_connect_done().
Also what about the same condition in auth_bind_user_done() ?
One more question -- the QE have identified this problem as a regression
since 1.8.x The code you changed predates 1.8, I think...so while it
might be fixing the symptoms, it probably is not the place that
regressed.
I just tried it on 1.8 and the failover doesn't work there either.
As noticed by Jakub, the same issue was also in auth_bind_user_done().
I'm sending new patch that fixes both places.
From dfcd28582a61a9d08928a33d024845bb084162cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <[email protected]>
Date: Fri, 14 Dec 2012 18:58:40 +0100
Subject: [PATCH] let ldap_chpass_uri failover work when using same hostname
https://fedorahosted.org/sssd/ticket/1699
We want to continue with the next server on all errors, not only
on ETIMEDOUT.
This particullar ticket was dealing with ECONNREFUSED.
---
src/providers/ldap/ldap_auth.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c
index b78fdb8edefd785f140c94e62029a9a356e6d115..b0dd30ce61938e8af33d2f783d88c761177fe150 100644
--- a/src/providers/ldap/ldap_auth.c
+++ b/src/providers/ldap/ldap_auth.c
@@ -609,14 +609,10 @@ static void auth_connect_done(struct tevent_req *subreq)
state->sdap_service->name,
state->srv, PORT_NOT_WORKING);
}
- if (ret == ETIMEDOUT) {
- if (auth_get_server(req) == NULL) {
- tevent_req_error(req, ENOMEM);
- }
- return;
- }
- tevent_req_error(req, ret);
+ if (auth_get_server(req) == NULL) {
+ tevent_req_error(req, ENOMEM);
+ }
return;
} else if (state->srv) {
be_fo_set_port_status(state->ctx->be, state->sdap_service->name,
@@ -659,14 +655,11 @@ static void auth_bind_user_done(struct tevent_req *subreq)
state->pw_expire_data = ppolicy;
}
talloc_zfree(subreq);
- if (ret == ETIMEDOUT) {
+ if (ret != EOK) {
if (auth_get_server(req) == NULL) {
tevent_req_error(req, ENOMEM);
}
return;
- } else if (ret != EOK) {
- tevent_req_error(req, ret);
- return;
}
tevent_req_done(req);
--
1.7.11.7
_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel