[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Mon May 10 06:11:35 MDT 2010
The branch, master has been updated
via aa8d91a... libwbclient: Fix a fd-leak at dlclose-time
via 36e7368... s3: Test for "__attribute__((destructor))"
from e2806f9... s4:acl ldb module - fix typos
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit aa8d91ae8e6b4b813c0479f09be9e090aff047a9
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.
commit 36e736871e28665ffcbbc4d0c87e1a2b60fcf0e0
Author: Volker Lendecke <vl at samba.org>
Date: Mon May 10 11:53:03 2010 +0200
s3: Test for "__attribute__((destructor))"
-----------------------------------------------------------------------
Summary of changes:
nsswitch/wb_common.c | 3 +++
source3/configure.in | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index fbb550f..9a3788a 100644
--- a/nsswitch/wb_common.c
+++ b/nsswitch/wb_common.c
@@ -62,6 +62,9 @@ static void init_response(struct winbindd_response *response)
/* Close established socket */
+#if HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR
+__attribute__((destructor))
+#endif
static void winbind_close_sock(void)
{
if (winbindd_fd != -1) {
diff --git a/source3/configure.in b/source3/configure.in
index 2e677d7..046df41 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1366,6 +1366,22 @@ if test x"$samba_cv_stat_dos_flags" = x"yes" ; then
AC_DEFINE(HAVE_STAT_DOS_FLAGS, 1, [whether there is DOS flags support in the stat struct])
fi
+AC_CACHE_CHECK([whether we can compile with __attribute__((destructor))],
+ samba_cv_function_attribute_destructor,
+ [
+ AC_COMPILE_IFELSE(
+ [
+ __attribute__((destructor))
+ static void cleanup(void) { }
+ ],
+ samba_cv_function_attribute_destructor=yes)
+ ])
+
+if test x"$samba_cv_function_attribute_destructor" = xyes ; then
+ AC_DEFINE(HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR, 1,
+ [whether we can compile with __attribute__((destructor))])
+fi
+
#####################################
# needed for SRV lookups
AC_CHECK_LIB(resolv, dn_expand)
--
Samba Shared Repository
More information about the samba-cvs
mailing list