libwbclient: Fix a fd-leak at dlclose-time
authorVolker Lendecke <vl@samba.org>
Mon, 10 May 2010 10:05:01 +0000 (12:05 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 21 Sep 2010 08:25:15 +0000 (10:25 +0200)
commitf7e7fa50ec3aef60b72a34988825e314b7228c23
treecc78095aa542750e4325d0a327775312c711aa15
parent462e5f7b139e294016ecefefed20dda107816622
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).
nsswitch/wb_common.c