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)