mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
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.
This commit is contained in:
parent
36e736871e
commit
aa8d91ae8e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user