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)
committerJeremy Allison <jra@samba.org>
Mon, 9 Mar 2015 23:50:09 +0000 (00:50 +0100)
commit60c7571984d7f1612828a72fae3ed8e66037d1f7
tree49ddc53ccfed28108490a40498931257f048dbd8
parent95a6a892d9f50aced3d67e7b79e5ca2401134c38
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.

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