Make winbind client library thread-safe by adding context
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Fri, 23 Jan 2015 22:35:50 +0000 (22:35 +0000)
committerKarolin Seeger <kseeger@samba.org>
Tue, 24 Mar 2015 03:51:15 +0000 (04:51 +0100)
commit7f787b447485649fdf14ab2f44a39cf7fe3fc719
treecf71bc6e1ac33925dd95e57630f5fcdba219b1c1
parentf56d56ebd643386b3e6147749d1a8c85449ebd82
Make winbind client library thread-safe by adding context

Rather than keep state in global variables, store the current
context such as the winbind file descriptor in a struct that is
passed in. This makes the winbind client library thread-safe.

https://bugzilla.samba.org/show_bug.cgi?id=11149

Signed-off-by: Matthew Newton <matthew-git@newtoncomputing.co.uk>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 60c7571984d7f1612828a72fae3ed8e66037d1f7)
nsswitch/wb_common.c
nsswitch/winbind_client.h
source4/torture/winbind/struct_based.c