libwbclient: Fix a fd-leak at dlclose-time
commitaa8d91ae8e6b4b813c0479f09be9e090aff047a9
authorVolker Lendecke <vl@samba.org>
Mon, 10 May 2010 10:05:01 +0000 (10 12:05 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 10 May 2010 12:11:14 +0000 (10 14:11 +0200)
treeb12426dab31c549e0635fef555a41bbb318646f8
parent36e736871e28665ffcbbc4d0c87e1a2b60fcf0e0
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.
nsswitch/wb_common.c