From 57187cafbcc053e75bb54750494df9feabe3a738 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Aug 2008 14:02:45 +1000 Subject: [PATCH] fixed a fd leak when trying to regain contact to a domain controller in winbind When a w2k3 DC is rebooted the 139/445 ports come up before the udp/389 cldap port. During this brief period, winbind manages to connect to 139/445 but not to udp 389. It then enters a tight loop where it leaks one fd each time. In a couple of seconds it runs out of file descriptors, and leaves winbind crippled after the DC does finally come up --- source/winbindd/winbindd_cm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c index b3f89506914..47df4e40589 100644 --- a/source/winbindd/winbindd_cm.c +++ b/source/winbindd/winbindd_cm.c @@ -1320,6 +1320,7 @@ static bool find_new_dc(TALLOC_CTX *mem_ctx, TALLOC_FREE(addrs); num_addrs = 0; + close(*fd); *fd = -1; goto again; -- 2.11.4.GIT