1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
samba-mirror/nsswitch/libwbclient
Ralph Boehme 642a4452ce nsswitch: leverage TLS if available in favour over global locking
The global locking can lead to deadlocks when using nscd: when processing the
first request in winbind, when we know we call into code that will recurse into
winbind we call winbind_off() which sets an environment variable which is later
checked here in the nsswitch module.

But with nscd in the stack, we don't see the env variable in nsswitch, so when
we try to acquire the global lock again, it is already locked and we deadlock.

By using a thread specific winbindd_context, plus a few other thread local global
variables, we don't need a global lock anymore.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2023-01-05 11:33:37 +00:00
..
ABI libwbclient: add wbc[Ctx]ChangeTrustCredentialsAt() 2022-12-21 19:10:35 +00:00
tests selftest: Extend test_wbc_logon_user to test WBFLAG_PAM_UNIX_NAME flag 2022-04-08 20:13:37 +00:00
Doxyfile
libwbclient.h
wbc_err_internal.h nsswitch: Fix wbclient BAIL macros. 2012-12-21 13:56:00 +01:00
wbc_guid.c nsswitch/libwbclient: explicitly mark all wbc* symbols as _PUBLIC_ 2021-11-30 15:53:34 +00:00
wbc_idmap.c nsswitch/libwbclient: explicitly mark all wbc* symbols as _PUBLIC_ 2021-11-30 15:53:34 +00:00
wbc_pam.c libwbclient: add wbc[Ctx]ChangeTrustCredentialsAt() 2022-12-21 19:10:35 +00:00
wbc_pwd.c nsswitch/libwbclient: explicitly mark all wbc* symbols as _PUBLIC_ 2021-11-30 15:53:34 +00:00
wbc_sid.c nsswitch: Align integer types 2022-12-12 21:16:33 +00:00
wbc_util.c nsswitch/libwbclient: explicitly mark all wbc* symbols as _PUBLIC_ 2021-11-30 15:53:34 +00:00
wbclient_internal.h Move wbc global variables into global context instead 2015-03-10 00:50:10 +01:00
wbclient.c nsswitch/libwbclient: explicitly mark all wbc* symbols as _PUBLIC_ 2021-11-30 15:53:34 +00:00
wbclient.h libwbclient: add wbc[Ctx]ChangeTrustCredentialsAt() 2022-12-21 19:10:35 +00:00
wbclient.pc.in wbclient: Add pkg-config file. 2011-08-21 03:22:04 +02:00
wscript nsswitch: leverage TLS if available in favour over global locking 2023-01-05 11:33:37 +00:00