From 5fde0c6ae45fbc4ec33cd3719d924973f02b2768 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 12 Mar 2018 12:20:04 +0100 Subject: [PATCH] winbindd: call reset_cm_connection_on_error() from reconnect_need_retry() This ensures we use the same disconnect logic in the reconnect backend, which calls reconnect_need_retry(), and in the dual_srv frontend which calls reset_cm_connection_on_error. Both reset_cm_connection_on_error() and reconnect_need_retry() are very similar, both return a bool indicating whether a retry should be attempted, unfortunately the functions have a different default return, so I don't dare unifying them, but instead just call one from the other. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke (cherry picked from commit 2837b796af3e491b6bb34bd441758ae214f629ee) --- source3/winbindd/winbindd_reconnect.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/source3/winbindd/winbindd_reconnect.c b/source3/winbindd/winbindd_reconnect.c index bbb5a37f390..aa7cd12e8b4 100644 --- a/source3/winbindd/winbindd_reconnect.c +++ b/source3/winbindd/winbindd_reconnect.c @@ -69,13 +69,7 @@ bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain) return false; } - if (NT_STATUS_EQUAL(status, NT_STATUS_IO_DEVICE_ERROR)) { - /* - * RPC call sent on expired session, needs - * reauthentication. - */ - invalidate_cm_connection(domain); - } + reset_cm_connection_on_error(domain, status); return true; } -- 2.11.4.GIT