winbindd: check for NT_STATUS_IO_DEVICE_ERROR in reset_cm_connection_on_error()
authorRalph Boehme <slow@samba.org>
Mon, 12 Mar 2018 10:12:34 +0000 (11:12 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 20 Apr 2018 09:56:22 +0000 (11:56 +0200)
reconnect_need_retry() already checks for this error, it surfaces up
from tstream_smbXcli_np as a mapping for EIO.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit a33c1d25e0422483c903001dd246626f84c4cbc1)

source3/winbindd/winbindd_dual_srv.c

index 66b4ee82a25b33c4fc13a0cb92cdf068d26b5498..7eff25a5bdf4546d59bd2410d8c03d566c4e4c68 100644 (file)
@@ -44,7 +44,9 @@ void _wbint_Ping(struct pipes_struct *p, struct wbint_Ping *r)
 static bool reset_cm_connection_on_error(struct winbindd_domain *domain,
                                        NTSTATUS status)
 {
-       if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
+       if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT) ||
+           NT_STATUS_EQUAL(status, NT_STATUS_IO_DEVICE_ERROR))
+       {
                invalidate_cm_connection(domain);
                /* We invalidated the connection. */
                return true;