mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
4af3faace4
When we are called in wb_atfork_child() or winbind_destructor(), wb_thread_ctx_destructor() is not called for the global state of the current nor any other thread, which means we would leak the related memory and socket fds. Now we maintain a global list protected by a global mutex. We traverse the list and close all socket fds, which are no longer used (winbind_destructor) or no longer valid in the current process (wb_atfork_child), in addition we 'autofree' the ones, which are only visible internally as global (per thread) context. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15464 Tested-by: Krzysztof Piotr Oledzki <ole@ans.pl> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Sep 14 18:53:07 UTC 2023 on atb-devel-224 |
||
---|---|---|
.. | ||
krb5_plugin | ||
libwbclient | ||
tests | ||
b15464-testcase.c | ||
nsstest.c | ||
nsstest.h | ||
pam_winbind.c | ||
pam_winbind.h | ||
stress-nss-libwbclient.c | ||
wb_common.c | ||
wb_reqtrans.c | ||
wb_reqtrans.h | ||
wbinfo.c | ||
winbind_client.h | ||
winbind_nss_aix.c | ||
winbind_nss_config.h | ||
winbind_nss_freebsd.c | ||
winbind_nss_hpux.h | ||
winbind_nss_linux.c | ||
winbind_nss_linux.h | ||
winbind_nss_netbsd.c | ||
winbind_nss_netbsd.h | ||
winbind_nss_solaris.c | ||
winbind_nss_solaris.h | ||
winbind_nss.h | ||
winbind_struct_protocol.h | ||
wins_freebsd.c | ||
wins.c | ||
wscript_build | ||
wscript_configure |