summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>2015-03-17 00:56:12 +0000
committerKarolin Seeger <kseeger@samba.org>2015-04-08 23:43:18 +0200
commit1dca6ee61be33617351315b6865ea23e7c238e77 (patch)
tree7f051acef48e8b40a76f773e9ced448b286ae4ba /nsswitch
parent84782d42c77b41d9560b2920d0a680c44a6e6e91 (diff)
downloadsamba-1dca6ee61be33617351315b6865ea23e7c238e77.tar.gz
Ensure we always initialise the winbind context
Stops segfault when a context is passed. Internal Samba code will currently always call this with NULL so won't trigger the bug. Signed-off-by: Matthew Newton <matthew-git@newtoncomputing.co.uk> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11149 libwbclient uses global variables and is not thread safe
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wb_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index 1bccfdaab75..95569b2fad3 100644
--- a/nsswitch/wb_common.c
+++ b/nsswitch/wb_common.c
@@ -745,7 +745,7 @@ NSS_STATUS winbindd_priv_request_response(struct winbindd_context *ctx,
{
NSS_STATUS status = NSS_STATUS_UNAVAIL;
int count = 0;
- struct winbindd_context *wb_ctx;
+ struct winbindd_context *wb_ctx = ctx;
if (ctx == NULL) {
wb_ctx = &wb_global_ctx;