summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2012-02-24 14:06:02 -0800
committerKarolin Seeger <kseeger@samba.org>2012-03-05 20:55:57 +0100
commite3051e78825be04f63d2b7cd77392b1c4bc3f2c0 (patch)
treefbde83022f4c07ac487e9982b0a3f68ca00d935e
parentca113c3ec909eb859806ccaf97bffb2f04ec8c26 (diff)
downloadsamba-e3051e78825be04f63d2b7cd77392b1c4bc3f2c0.tar.gz
s3-winbindd: Close netlogon connection if the status returned by the NetrSamLogonEx call is timeout in the pam_auth_crap path
If not the child process would hang for quite a long time up to the moment when the connection is cleaned by the kernel (took ~ 20 minutes) in my tests. Fix bug #8771 (Winbind takes up to 20 minutes to change from DC 1 to DC 2 and in the meantime to respond NT_STATUS_IO_TIMEOUT). (cherry picked from commit 8e141d666c3fc835001249753b6ea9b508256d73)
-rw-r--r--source3/winbindd/winbindd_pam.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 5c56b8731ab..26fdc5a409a 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -2101,6 +2101,15 @@ enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
done:
+ if (NT_STATUS_EQUAL(result, NT_STATUS_IO_TIMEOUT)) {
+ DEBUG(3,("winbindd_dual_pam_auth_crap: sam_network_logon(ex) "
+ "returned NT_STATUS_IO_TIMEOUT after the retry."
+ "We didn't know what's going on killing "
+ "connections to domain %s\n",
+ name_domain));
+ invalidate_cm_connection(&contact_domain->conn);
+ }
+
/* give us a more useful (more correct?) error code */
if ((NT_STATUS_EQUAL(result, NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND) ||
(NT_STATUS_EQUAL(result, NT_STATUS_UNSUCCESSFUL)))) {