From b6b96a39d3abb39bb29633a6fccaa53f3dcac5b6 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Fri, 24 Feb 2012 14:06:02 -0800 Subject: [PATCH] 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. --- source3/winbindd/winbindd_pam.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 93034ad..f54149a 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -1875,6 +1875,15 @@ process_result: 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(&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)))) { -- 1.7.5.4