[SCM] Samba Shared Repository - branch v3-5-test updated

Karolin Seeger kseeger at samba.org
Tue Sep 21 02:25:00 MDT 2010


The branch, v3-5-test has been updated
       via  f7e7fa5 libwbclient: Fix a fd-leak at dlclose-time
      from  462e5f7 Fix bug #7669.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -----------------------------------------------------------------
commit f7e7fa50ec3aef60b72a34988825e314b7228c23
Author: Volker Lendecke <vl at samba.org>
Date:   Mon May 10 12:05:01 2010 +0200

    libwbclient: Fix a fd-leak at dlclose-time
    
    __attribute__((destructor)) makes winbind_close_sock() being called at
    dlclose() time.
    
    Found while testing apache on Linux with mod_auth_pam.
    
    Other platforms will have to find a different fix. One possibility would be to
    always close the socket after each operation, but this badly sucks
    performance-wise.
    
    Fix bug #7684 (fd leak in libwbclient.so).

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

Summary of changes:
 nsswitch/wb_common.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index d0dfcb8..b7fafc3 100644
--- a/nsswitch/wb_common.c
+++ b/nsswitch/wb_common.c
@@ -61,6 +61,9 @@ static void init_response(struct winbindd_response *response)
 
 /* Close established socket */
 
+#if HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR
+__attribute__((destructor))
+#endif
 void winbind_close_sock(void)
 {
 	if (winbindd_fd != -1) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list