[SCM] Samba Shared Repository - branch master updated

Jim McDonough jmcd at samba.org
Wed Nov 28 09:18:02 MST 2012


The branch, master has been updated
       via  cb0064d BUG 9436: Fix leaking sockets of SMB connections to a DC.
      from  bc6bcee s3:vfs_gpfs: add no memory check in gpfs2smb_acl()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit cb0064d35cdc60c7c625ad4561ad77739f8553c5
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Nov 28 12:53:39 2012 +0100

    BUG 9436: Fix leaking sockets of SMB connections to a DC.
    
    As this is a burst of 3 unbound sockets with each try to reach a DC
    we're running out of file descriptors pretty fast. So winbind is then
    mostly spinning in an accept loop failing with EMFILE.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jim McDonough <jmcd at samba.org>
    
    Autobuild-User(master): Jim McDonough <jmcd at samba.org>
    Autobuild-Date(master): Wed Nov 28 17:17:21 CET 2012 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source3/winbindd/winbindd_cm.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 79b5839..57027eb 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1598,6 +1598,10 @@ static NTSTATUS cm_open_connection(struct winbindd_domain *domain,
 
 		result = cm_prepare_connection(domain, fd, domain->dcname,
 			&new_conn->cli, &retry);
+		if (!NT_STATUS_IS_OK(result)) {
+			/* Don't leak the smb connection socket */
+			close(fd);
+		}
 
 		if (!retry)
 			break;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list